I am going to install numpy library as a *.whl file, as numpy-1.9.2rc1+mkl- cp27-none-win32, on my Windows 7 machine...
Here is my approaches to do that, are which pip and easy_install packages...
The odd thing is that both don't work in the case of either Python 3.4 or Python 2.7...
Here are the trace of the attempts in the command prompt:
pip:
"C:\Users\Matinking\Desktop\numpy- 1.9.2rc1+
mkl-cp27-none-win32.whl" f
Exception:
Traceback (most recent call last):
File "c:\python34\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "c:\python34\lib\site-packages\pip\commands\install.py", line 257, in r
InstallRequirement.from_line(name, None))
File "c:\python34\lib\site-packages\pip\req.py", line 172, in from_line
return cls(req, comes_from, url=url, prereleases=prereleases)
File "c:\python34\lib\site-packages\pip\req.py", line 70, in __init__
req = pkg_resources.Requirement.parse(req)
File "c:\python34\lib\site-packages\pip\_vendor\pkg_resources.py", line 2667
in parse
reqs = list(parse_requirements(s))
File "c:\python34\lib\site-packages\pip\_vendor\pkg_resources.py", line 2605
in parse_requirements
line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
File "c:\python34\lib\site-packages\pip\_vendor\pkg_resources.py", line 2573
in scan_list
raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', ' C:\\Users\\Matinking\\Desktop\\numer
performance.pdf', 'at', ':\\Users\\Matinking\\Desktop\\numericperformance.pdf'
Storing debug log for failure in C:\Users\Matinking\pip\pip.log
and easy_install:
C:\Python34\Scripts>easy_install.exe "C:\Users\Matinking\Desktop\numpy- 1.9.2rc1+
mkl-cp27-none-win32.whl"
Processing numpy-1.9.2rc1+mkl-cp27-none-win32.whl
Writing C:\Users\MATINK~1\AppData\Local\Temp\easy_install- jr2ijafr\numpy\setup.c
fg
Running numpy\setup.py -q bdist_egg --dist-dir C:\Users\MATINK~1\AppData\Local\T
emp\easy_install-jr2ijafr\numpy\egg-dist-tmp-umy5kseg
This is the wrong setup.py file to run
No eggs found in C:\Users\MATINK~1\AppData\Local\Temp\easy_install-jr2ijafr\nump
y\egg-dist-tmp-umy5kseg (setup script problem?)
Any idea for the problem?!
You should upgrade your pip to version 6.0, the .whl file you're using isn't compatible with earlier versions.
To bump up your pip version on Windows :
python -m pip install -U pip
pip error -> why were you running an install on a pdf? That was never going to work.
easy_install error -> looks like you downloaded a python 2.7 binary and tried to install into a python 3.4 installation.
For scientific stack python, you are hard pressed to beat an Anaconda python distribution.
Related
I am getting the following error:
ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\CR1008tu\AppData\Roaming\Python\Python38\site-packages\pip\_internal\cli\base_command.py", line 186, in _main
status = self.run(options, args)
File "C:\Users\CR1008tu\AppData\Roaming\Python\Python38\site-packages\pip\_internal\commands\install.py", line 395, in run
installed = install_given_reqs(
File "C:\Users\CR1008tu\AppData\Roaming\Python\Python38\site-packages\pip\_internal\req\__init__.py", line 67, in install_given_reqs
requirement.install(
File "C:\Users\CR1008tu\AppData\Roaming\Python\Python38\site-packages\pip\_internal\req\req_install.py", line 809, in install
install_wheel(
File "C:\Users\CR1008tu\AppData\Roaming\Python\Python38\site-packages\pip\_internal\operations\install\wheel.py", line 607, in install_wheel
install_unpacked_wheel(
File "C:\Users\CR1008tu\AppData\Roaming\Python\Python38\site-packages\pip\_internal\operations\install\wheel.py", line 548, in install_unpacked_wheel
generated_console_scripts = maker.make_multiple(scripts_to_generate)
File "C:\Users\CR1008tu\AppData\Roaming\Python\Python38\site-packages\pip\_vendor\distlib\scripts.py", line 415, in make_multiple
filenames.extend(self.make(specification, options))
File "C:\Users\CR1008tu\AppData\Roaming\Python\Python38\site-packages\pip\_internal\operations\install\wheel.py", line 280, in make
return super(PipScriptMaker, self).make(specification, options)
File "C:\Users\CR1008tu\AppData\Roaming\Python\Python38\site-packages\pip\_vendor\distlib\scripts.py", line 404, in make
self._make_script(entry, filenames, options=options)
File "C:\Users\CR1008tu\AppData\Roaming\Python\Python38\site-packages\pip\_vendor\distlib\scripts.py", line 304, in _make_script
self._write_script(scriptnames, shebang, script, filenames, ext)
File "C:\Users\CR1008tu\AppData\Roaming\Python\Python38\site-packages\pip\_vendor\distlib\scripts.py", line 239, in _write_script
launcher = self._get_launcher('t')
File "C:\Users\CR1008tu\AppData\Roaming\Python\Python38\site-packages\pip\_vendor\distlib\scripts.py", line 383, in _get_launcher
raise ValueError(msg)
ValueError: Unable to find resource t32.exe in package pip._vendor.distlib
Please take a look!
This one worked perfectly for me without any additional installations or 3rd party scripts:
python -m pip uninstall pip
python -m ensurepip
python -m pip install -U pip
TRY THIS:
uninstall current pip:
python -m pip uninstall pip setuptools
download get-pip.py from https://bootstrap.pypa.io/get-pip.py
execute get-pip script:
python get-pip.py
Don't forget to mark answer correct if you find it helpful.
Thanks
This worked for me. I visited this page and searched for the missing resource "t32.exe".
Scroll down the page and complete the capture, and click on download. t32.exe file download.
Before you download, make sure your antivirus is on to avoid any problems after the download.
After downloading, go to the directory
C:\Users\CR1008tu\AppData\Roaming\Python\Python38\site-packages\pip_vendor\distlib\
Now copy and paste the downloaded t32.exe file and paste it into the directory and save it. Now run python -m pip install -–upgrade pip again.
I'm trying to install cryptography to my system, but I get this error:
WARNING: Missing build requirements in pyproject.toml for cryptography from https://files.pythonhosted.org/packages/07/ca/bc827c5e55918ad223d59d299fff92f3563476c3b00d0a9157d9c0217449/cryptography-2.6.1.tar.gz#sha256=26c821cbeb683facb966045e2064303029d572a87ee69ca5a1bf54bf55f93ca6.
WARNING: The project does not specify a build backend, and pip cannot fall back to setuptools without 'setuptools>=40.8.0' and 'wheel'.
Getting requirements to build wheel ... done
ERROR: Exception:
Traceback (most recent call last):
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 178, in main
status = self.run(options, args)
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 352, in run
resolver.resolve(requirement_set)
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/resolve.py", line 131, in resolve
self._resolve_one(requirement_set, req)
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/resolve.py", line 294, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for
self.require_hashes
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 368, in prepare_linked_requirement
abstract_dist.prep_for_dist(finder, self.build_isolation)
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 175, in prep_for_dist
self.install_backend_dependencies(finder=finder)
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 123, in install_backend_dependencies
reqs = req.pep517_backend.get_requires_for_build_wheel()
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.py", line 71, in get_requires_for_build_wheel
'config_settings': config_settings
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.py", line 162, in _call_hook
raise BackendUnavailable
pip._vendor.pep517.wrappers.BackendUnavailable
This is my setup:
Alpine Linux 3.6.2
Python 3.6.3
pip 19.1
wheel 0.33.1
setuptools 41.0.1
Any idea what could be the problem, or how to solve it?
Thanks for the help in advance!
I did not find any uniform solution to this problem. You can try the following troubleshooting steps. one of them should work.
Upgrade the pip version.
Change the library/package version.
If you are installing from source, try a different .whl package or use tar.gz.
Use --no-use-pep517 with your pip install command (didn't work for me though, but I see it worked for some).
I got the same error with a different library and --no-use-pep517 did not help. However this did:
python -m pip install --upgrade pip
I'm running python 3.5.3 on Windows
I tried using
pip install --upgrade tensorflow
and here's what i get back
Using cached tensorflow-1.0.1-cp35-cp35m-win_amd64.whl
Requirement already up-to-date: wheel>=0.26 in
c:\users\max\miniconda3\lib\site-packages (from tensorflow)
Exception:
Traceback (most recent call last):
File "C:\Users\Max\Miniconda3\lib\site-packages\pip\basecommand.py", line
215, in main
status = self.run(options, args)
File "C:\Users\Max\Miniconda3\lib\site-packages\pip\commands\install.py", line 335, in run
wb.build(autobuilding=True)
File "C:\Users\Max\Miniconda3\lib\site-packages\pip\wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "C:\Users\Max\Miniconda3\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:\Users\Max\Miniconda3\lib\site-packages\pip\req\req_set.py", line 666, in _prepare_file
check_dist_requires_python(dist)
File "C:\Users\Max\Miniconda3\lib\site-packages\pip\utils\packaging.py", line 48, in check_dist_requires_python
feed_parser.feed(metadata)
File "C:\Users\Max\Miniconda3\lib\email\feedparser.py", line 178, in feed
self._input.push(data)
File "C:\Users\Max\Miniconda3\lib\email\feedparser.py", line 104, in push
self._partial.write(data)
TypeError: string argument expected, got 'NoneType'
I've also tried
pip3 install --upgrade tensorflow
but I get back
'pip3' is not recognized as an internal or external command, operable program or batch file.
I'm not too sure what the error is, and googling hasn't gotten me any results
I also had the same issue. I'm using Anaconda, and I managed to install it with these commands:
conda create -n tensorflow
activate tensorflow
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.1-cp35-cp35m-win_amd64.whl
This worked for me, and probably this will work for miniconda too.
I have just reported this issue upstream to IPython but I believe that a workaround might exist in Buildout if I can filter out that section altogether.
Travis Builds
On Travis, the same code builds fine on Python 3.5, but fails on 2.7 and 3.4.
What happens on Python 2.7 when I run bin/buildout:
Installing ipython.
Getting distribution for 'ipython'.
error: Setup script exited with error in ipython setup command: Invalid environment marker: sys_platform == "win32" and python_version < "3.6"
An error occurred when trying to install /tmp/tmprLOC_8get_dist/ipython-5.3.0.tar.gz. Look above this message for any errors that were output by easy_install.
While:
Installing ipython.
Getting distribution for 'ipython'.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py2.7.egg/zc/buildout/buildout.py", line 1982, in main
getattr(buildout, command)(args)
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py2.7.egg/zc/buildout/buildout.py", line 668, in install
installed_files = self[part]._call(recipe.install)
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py2.7.egg/zc/buildout/buildout.py", line 1419, in _call
return f()
File "/home/travis/build/naftulikay/aws-env/eggs/zc.recipe.egg-2.0.3-py2.7.egg/zc/recipe/egg/egg.py", line 126, in install
reqs, ws = self.working_set()
File "/home/travis/build/naftulikay/aws-env/eggs/zc.recipe.egg-2.0.3-py2.7.egg/zc/recipe/egg/egg.py", line 84, in working_set
allow_hosts=self.allow_hosts)
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py2.7.egg/zc/buildout/easy_install.py", line 913, in install
return installer.install(specs, working_set)
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py2.7.egg/zc/buildout/easy_install.py", line 665, in install
for dist in self._get_dist(requirement, ws):
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py2.7.egg/zc/buildout/easy_install.py", line 563, in _get_dist
dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py2.7.egg/zc/buildout/easy_install.py", line 1699, in _move_to_eggs_dir_and_compile
[tmp_loc] = glob.glob(os.path.join(tmp_dest, '*'))
ValueError: need more than 0 values to unpack
What happens on Python 3.4 when I run bin/buildout:
Installing ipython.
Getting distribution for 'ipython'.
error: Setup script exited with error in ipython setup command: Invalid environment marker: python_version >= "3.4"
An error occurred when trying to install /tmp/tmpos_bscj8get_dist/ipython-5.3.0.tar.gz. Look above this message for any errors that were output by easy_install.
While:
Installing ipython.
Getting distribution for 'ipython'.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py3.4.egg/zc/buildout/buildout.py", line 1982, in main
getattr(buildout, command)(args)
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py3.4.egg/zc/buildout/buildout.py", line 668, in install
installed_files = self[part]._call(recipe.install)
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py3.4.egg/zc/buildout/buildout.py", line 1419, in _call
return f()
File "/home/travis/build/naftulikay/aws-env/eggs/zc.recipe.egg-2.0.3-py3.4.egg/zc/recipe/egg/egg.py", line 126, in install
reqs, ws = self.working_set()
File "/home/travis/build/naftulikay/aws-env/eggs/zc.recipe.egg-2.0.3-py3.4.egg/zc/recipe/egg/egg.py", line 84, in working_set
allow_hosts=self.allow_hosts)
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py3.4.egg/zc/buildout/easy_install.py", line 913, in install
return installer.install(specs, working_set)
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py3.4.egg/zc/buildout/easy_install.py", line 665, in install
for dist in self._get_dist(requirement, ws):
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py3.4.egg/zc/buildout/easy_install.py", line 563, in _get_dist
dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py3.4.egg/zc/buildout/easy_install.py", line 1699, in _move_to_eggs_dir_and_compile
[tmp_loc] = glob.glob(os.path.join(tmp_dest, '*'))
ValueError: need more than 0 values to unpack
Local Development
On CentOS 7 with Python 2.7.5, it fails in the following fashion:
[vagrant#devel vagrant]$ python --version
Python 2.7.5
[vagrant#devel vagrant]$ python bootstrap.py
ez_setup.py is deprecated and when using it setuptools will be pinned to 33.1.1 since it's the last version that supports setuptools self upgrade/installation, check https://github.com/pypa/setuptools/issues/581 for more info; use pip to install setuptools
Downloading https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip
Extracting in /tmp/tmpftyX3t
Now working in /tmp/tmpftyX3t/setuptools-33.1.1
Building a Setuptools egg in /tmp/bootstrap-nc0bVK
warning: no files found matching '*' under directory 'setuptools/_vendor'
/tmp/bootstrap-nc0bVK/setuptools-33.1.1-py2.7.egg
warning: no files found matching '*.txt' under directory 'doc'
Creating directory '/vagrant/develop-eggs'.
Generated script '/vagrant/bin/buildout'.
[vagrant#devel vagrant]$ bin/buildout
Upgraded:
setuptools version 34.3.3;
restarting.
Generated script '/vagrant/bin/buildout'.
Version and requirements information containing setuptools:
Base installation request: 'zc.buildout', 'setuptools'
Requirement of zc.buildout>=2.9.2: setuptools>=8.0
While:
Installing.
Checking for upgrades.
Error: There is a version conflict.
We already have: setuptools 0.9.8
but zc.buildout 2.9.2 requires 'setuptools>=8.0'.
On CentOS 7 with Python 3.4, I encounter no issues whatsoever.
Matrix
Travis
Python 2.7 (fail)
Python 3.4 (fail)
Python 3.5 (success)
Local
Python 2.7.5 (fail)
Python 3.4.5 (success)
Is there an issue with my buildout configuration? Is there a way for me to configure Travis to skip a given section during bin/buildout execution?
I've run across similar issue while running from PyCharms' tools. I had script under: /home/gonczor/Projects/STX/presence-analyzer/presence-analyzer-wgonczaronek/bin/buildout, python 2.7.12 in venv and I had to change working directory from /home/gonczor/Projects/STX/presence-analyzer/presence-analyzer-wgonczaronek/ to /home/gonczor/Projects/STX/presence-analyzer/presence-analyzer-wgonczaronek (so to remove trailing slash). I'm on Linux Mint 18 with 4.4 kernel).
I am a beginner in python. I am facing the following problem.
Whenever I start pycharm Community edition (version 5.0.3), the Python console fails to starts and shows the following error:
usr/bin/python2.7 /usr/lib/pycharm-community/helpers/pydev/pydevconsole.py 53192 49994
Traceback (most recent call last):
File "/usr/lib/pycharm-community/helpers/pydev/pydevconsole.py", line 488, in <module>
pydevconsole.StartServer(pydev_localhost.get_localhost(), int(port), int(client_port))
File "/usr/lib/pycharm-community/helpers/pydev/pydevconsole.py", line 330, in StartServer
interpreter = InterpreterInterface(host, client_port, threading.currentThread())
File "/usr/lib/pycharm-community/helpers/pydev/pydev_ipython_console.py", line 26, in __init__
self.interpreter = get_pydev_frontend(host, client_port)
File "/usr/lib/pycharm-community/helpers/pydev/pydev_ipython_console_011.py", line 472, in get_pydev_frontend
_PyDevFrontEndContainer._instance = _PyDevFrontEnd()
File "/usr/lib/pycharm-community/helpers/pydev/pydev_ipython_console_011.py", line 303, in __init__
self.ipython = PyDevTerminalInteractiveShell.instance()
File "/usr/lib/python2.7/dist-packages/IPython/config/configurable.py", line 354, in instance
inst = cls(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/IPython/terminal/interactiveshell.py", line 328, in __init__
**kwargs
File "/usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.py", line 483, in __init__
self.init_readline()
File "/usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.py", line 1816, in init_readline
if self.readline_use:
File "/home/vivekruhela/.local/lib/python2.7/site-packages/traitlets/traitlets.py", line 529, in __get__
return self.get(obj, cls)
File "/home/vivekruhela/.local/lib/python2.7/site-packages/traitlets/traitlets.py", line 507, in get
% (self.name, obj))
traitlets.traitlets.TraitError: No default value found for None trait of <pydev_ipython_console_011.PyDevTerminalInteractiveShell object at 0x7f7b0e682cd0>
Process finished with exit code 1
Couldn't connect to console process.
How can I connect to the pycharm console? I have already installed IPython in my system.
I had the same issue.
I solved this by updating ipython.
My version was 3.1.0, upgrading it to 4.1.1 solved it.
in my case:
workon project
pip install -U ipython
I've found that this happened because I had installed ipython version 4.x, and then reverted to 3.2.0, without uninstalling the traitlets more advanced version first. This did the trick then:
pip uninstall ipython[all]
pip uninstall traitlets
pip install ipython==3.2.0
In my case, this was due to a conflicting installation of IPython through pip and apt. Removing the apt-installed version using sudo apt remove ipython fixed the problem.
I initially tried unsuccessfully by trying
pip install -U ipython
But then tried following and it worked:
pip uninstall ipython[all]
pip uninstall traitlets
pip install ipython
Thanks #mirandes