Description
Environment
- Pythonnet version: 2.3.0
- Python version: 3.7
- Operating System: Windows 7
- Distribution: Anaconda
Details
-
I'm attempting to install Pythonnet on my work computer via the Anaconda Prompt
- The easy ways to download package appear to be blocked (see 1st error in post below)
- Similar error message encountered when attempting to install using Conda (conda install -c pythonnet pythonnet).
- SSL error messages may be related to user restrictions on my work laptop, but not sure
- I have not found any way around this
-
Ultimately, I assume that I can only install by downloading the zip file due to my security limitations
- I am very new to programming / python, so I have no clue how to do this
- When I run the code listed in the wiki, I get another error message (see 2nd error in post below)
- When I try to run pip install directly on the extracted zip file location, I get a different error message (see 3rd error in post below)
Summary of Question:
What is a simple step by step process for performing an install of Pythonnet given my restrictions?
I'm completely new to this so I'm sure I'm doing something very basic incorrectly.
If there is a better forum for this basic question, please let me know.
Thanks!
References:
https://github.com/pythonnet/pythonnet/wiki/Installation
1st Error for running pip install pythonnet - code from Anaconda command prompt:
(base) C:\Users\MATT>pip install pythonnet
Collecting pythonnet
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /packages/89/3b/a22cd45b591d6cf490ee8b24d52b9db1f30b4b4
78b64a9b231c53474731e/pythonnet-2.3.0.tar.gz
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /packages/89/3b/a22cd45b591d6cf490ee8b24d52b9db1f30b4b4
78b64a9b231c53474731e/pythonnet-2.3.0.tar.gz
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /packages/89/3b/a22cd45b591d6cf490ee8b24d52b9db1f30b4b4
78b64a9b231c53474731e/pythonnet-2.3.0.tar.gz
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /packages/89/3b/a22cd45b591d6cf490ee8b24d52b9db1f30b4b4
78b64a9b231c53474731e/pythonnet-2.3.0.tar.gz
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFI
CATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certif
icate (_ssl.c:1045)'))': /packages/89/3b/a22cd45b591d6cf490ee8b24d52b9db1f30b4b4
78b64a9b231c53474731e/pythonnet-2.3.0.tar.gz
Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host=
'files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/89
/3b/a22cd45b591d6cf490ee8b24d52b9db1f30b4b478b64a9b231c53474731e/pythonnet-2.3.0
.tar.gz (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIF
Y_FAILED] certificate verify failed: unable to get local issuer certificate (_ss
l.c:1045)')))
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.
(base) C:\Users\MATT>
2nd Error for running my interpretation of instructions from wiki - code from Anaconda command prompt:
(base) C:\Users\MATT>cd C:\Users\MATT\Downloads\pythonnet-master\pythonnet-mas
ter
(base) C:\Users\MATT\Downloads\pythonnet-master\pythonnet-master>python setup.p
y bdist_wheel --xplat
running bdist_wheel
running build
running build_ext
error: [WinError 2] The system cannot find the file specified
(base) C:\Users\MATT\Downloads\pythonnet-master\pythonnet-master>
3rd Error for running pip install from downloaded zip folder - code from Anaconda command prompt:
(base) C:\Users\MATT>pip install C:\Users\MATT\Downloads\pythonnet-master\pyth
onnet-master
Processing c:\users\Matt\downloads\pythonnet-master\pythonnet-master
Building wheels for collected packages: pythonnet
Running setup.py bdist_wheel for pythonnet ... error
Complete output from command C:\Users\MATT\AppData\Local\Continuum\anaconda3
python.exe -u -c "import setuptools, tokenize;file='C:\Users\MATT\AppDat
a\Local\Temp\pip-req-build-xgqyixsc\setup.py';f=getattr(tokenize, 'open', op
en)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, _
file_, 'exec'))" bdist_wheel -d C:\Users\MATT\AppData\Local\Temp\pip-wheel-0_
g8ej3_ --python-tag cp37:
running bdist_wheel
running build
running build_ext
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 4.7.1.
NuGet.exe is up to date.
MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x
86)\MSBuild\14.0\bin\amd64'.
All packages listed in packages.config are already installed.
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\MATT\AppData\Local\Temp\pip-req-build-xgqyixsc\setup.py", li
ne 534, in
zip_safe=False,
File "C:\Users\MATT\AppData\Local\Continuum\anaconda3\lib\site-packages\set
uptools_init_.py", line 140, in setup
return distutils.core.setup(**attrs)
File "C:\Users\MATT\AppData\Local\Continuum\anaconda3\lib\distutils\core.py
", line 148, in setup
dist.run_commands()
File "C:\Users\MATT\AppData\Local\Continuum\anaconda3\lib\distutils\dist.py
", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\MATT\AppData\Local\Continuum\anaconda3\lib\distutils\dist.py
", line 985, in run_command
cmd_obj.run()
File "C:\Users\MATT\AppData\Local\Temp\pip-req-build-xgqyixsc\setup.py", li
ne 482, in run
return bdist_wheel.bdist_wheel.run(self)
File "C:\Users\MATT\AppData\Local\Continuum\anaconda3\lib\site-packages\whe
el\bdist_wheel.py", line 202, in run
self.run_command('build')
File "C:\Users\MATT\AppData\Local\Continuum\anaconda3\lib\distutils\cmd.py"
, line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\MATT\AppData\Local\Continuum\anaconda3\lib\distutils\dist.py
", line 985, in run_command
cmd_obj.run()
File "C:\Users\MATT\AppData\Local\Continuum\anaconda3\lib\distutils\command
\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\MATT\AppData\Local\Continuum\anaconda3\lib\distutils\cmd.py"
, line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\MATT\AppData\Local\Continuum\anaconda3\lib\distutils\dist.py
", line 985, in run_command
cmd_obj.run()
File "C:\Users\MATT\AppData\Local\Continuum\anaconda3\lib\distutils\command
\build_ext.py", line 339, in run
self.build_extensions()
File "C:\Users\MATT\AppData\Local\Continuum\anaconda3\lib\distutils\command
\build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "C:\Users\MATT\AppData\Local\Continuum\anaconda3\lib\distutils\command
\build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\MATT\AppData\Local\Temp\pip-req-build-xgqyixsc\setup.py", li
ne 257, in build_extension
manifest = self._get_manifest(dest_dir)
File "C:\Users\MATT\AppData\Local\Temp\pip-req-build-xgqyixsc\setup.py", li
ne 274, in _get_manifest
mt = self._find_msbuild_tool("mt.exe", use_windows_sdk=True)
File "C:\Users\MATT\AppData\Local\Temp\pip-req-build-xgqyixsc\setup.py", li
ne 399, in _find_msbuild_tool
raise RuntimeError("{0} could not be found".format(tool))
RuntimeError: mt.exe could not be found
Failed building wheel for pythonnet
Running setup.py clean for pythonnet
Failed to build pythonnet
twisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed.
Installing collected packages: pythonnet
Running setup.py install for pythonnet ... error
Complete output from command C:\Users\MATT\AppData\Local\Continuum\anaconda
3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\MATT\AppD
ata\Local\Temp\pip-req-build-xgqyixsc\setup.py';f=getattr(tokenize, 'open',
open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code,
file, 'exec'))" install --record C:\Users\MATT\AppData\Local\Temp\pip-reco
rd-wux2fqp2\install-record.txt --single-version-externally-managed --compile:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --single-version-externally-managed not recognized
----------------------------------------
Command "C:\Users\MATT\AppData\Local\Continuum\anaconda3\python.exe -u -c "impo
rt setuptools, tokenize;file='C:\Users\MATT\AppData\Local\Temp\pip-re
q-build-xgqyixsc\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.r
ead().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" ins
tall --record C:\Users\MATT\AppData\Local\Temp\pip-record-wux2fqp2\install-reco
rd.txt --single-version-externally-managed --compile" failed with error code 1 i
n C:\Users\MATT\AppData\Local\Temp\pip-req-build-xgqyixsc
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.
(base) C:\Users\MATT>