pip could not resolve dependencies in requirement.txt - python

My requirments.txt read
Cython
pot
I run pip install -r requirement.txt
Collecting Cython (from -r requirements.txt (line 30))
Downloading https://files.pythonhosted.org/packages/e7/bd/59054534d09830394470c14e4dd4a2e8fa64ac14559095a044208bf34c18/Cython-0.29.7-cp35-cp35m-manylinux1_x86_64.whl (2.0MB)
100% |################################| 2.0MB 17.7MB/s
Collecting pot (from -r requirements.txt (line 31))
Downloading https://files.pythonhosted.org/packages/28/4b/7aaa1f840a359f5953dd378e0237fa8faf9b0a415ff7282b7375fbe68d27/POT-0.5.1.tar.gz (720kB)
100% |################################| 727kB 17.3MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-5w30dx4k/pot/setup.py", line 7, in <module>
from Cython.Build import cythonize
ImportError: No module named 'Cython'
It seems that Cython is just downloaded rather than installed, so pot still has an installation failure. When I first install Cython mannually then pot using pip, it works.
Any solutions to resolve this dependencies automatically?
I am using Ubuntu 18.04 with python3 AND i do not want to use conda.

Related

I'm having trouble downloading the slycot library using terminal via pip

So I'm trying to download slycot via pip and I keep getting errors. To be completely honest I'm not totally familiar with terminal prompts and how all that works. Here is what I'm getting when I run, sudo -H pip3 install slycot
Here is what terminal publishes with that command:
Collecting slycot
Using cached https://files.pythonhosted.org/packages/ae/9d/7ed3f2abf08aab0be9ac2b67e3040c20d9c594cce6a4af2203da0c28a6c4/slycot-0.3.5.0.tar.gz
Installing build dependencies ... done
Missing build requirements in pyproject.toml for slycot from https://files.pythonhosted.org/packages/ae/9d/7ed3f2abf08aab0be9ac2b67e3040c20d9c594cce6a4af2203da0c28a6c4/slycot-0.3.5.0.tar.gz#sha256=cad98d5ea4f0a034cf398c39189f587620a0b03f1d4b71e77cd622a327f13adf.
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 ... error
Complete output from command /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpz94vocr1:
Traceback (most recent call last):
File "setup.py", line 25, in <module>
from skbuild import setup
ModuleNotFoundError: No module named 'skbuild'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
main()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 54, in get_requires_for_build_wheel
return hook(config_settings)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/build_meta.py", line 130, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/build_meta.py", line 112, in _get_build_requires
self.run_setup()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/build_meta.py", line 211, in run_setup
self).run_setup(setup_script=setup_script)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/build_meta.py", line 126, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 28, in <module>
raise ImportError('sckit-build must be installed before running setup.py')
ImportError: sckit-build must be installed before running setup.py
----------------------------------------
Command "/Library/Developer/CommandLineTools/usr/bin/python3 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpz94vocr1" failed with error code 1 in /private/tmp/pip-install-t9m8s8yp/slycot
You are using pip version 19.0.3, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
I've now tried pip install scikit-build and this returns
Requirement already satisfied: scikit-build in /Library/Python/3.7/site-packages (0.10.0)
Requirement already satisfied: packaging in /Library/Python/3.7/site-packages (from scikit-build) (20.1)
Requirement already satisfied: setuptools>=28.0.0 in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages (from scikit-build) (40.8.0)
Requirement already satisfied: wheel>=0.29.0 in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages (from scikit-build) (0.33.1)
Requirement already satisfied: pyparsing>=2.0.2 in /Library/Python/3.7/site-packages (from packaging->scikit-build) (2.4.6)
Requirement already satisfied: six in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages (from packaging->scikit-build) (1.12.0)
You are using pip version 19.0.3, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
I've also tried, pip install cmake and this returns
Requirement already satisfied: cmake in /Library/Python/3.7/site-packages (3.16.3)
You are using pip version 19.0.3, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Any help would be appreciated.
You have another error with the installation of slycot, you have a dependency on skbuild.
In order to fix it check this site that gives you the compiled binaries to the skbuild package and try again [and maybe cmake as well]
Try this
pip install scikit-build; pip install cmake
You can read here for more details and ways to make this work.
Not able to install skbuild

Virtutalenv Command "python setup.py egg_info" failed with error code 1

I've been trying to follow this guide: https://www.youtube.com/watch?v=x9lKLGTfQFU
and I've come to a problem running the line pip install -r requirements.txt within the virtual environment, this is what happens:
(venv) C:\Users\George\Desktop\Kodi> pip install -r requirements.txt
Collecting gunicorn (from -r requirements.txt (line 1))
Using cached https://files.pythonhosted.org/packages/8c/da/b8dd8deb741bff556db53902d4706774c8e1e67265f69528c14c003644e6/gunicorn-19.9.0-py2.py3-none-any.whl
Collecting pytz (from -r requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/30/4e/27c34b62430286c6d59177a0842ed90dc789ce5d1ed740887653b898779a/pytz-2018.5-py2.py3-none-any.whl
Collecting flask-ask>=0.9.8 (from -r requirements.txt (line 3))
Using cached https://files.pythonhosted.org/packages/6a/f5/d4709ae94584a0b1541e9b52b2d25a8a1bdb6e2da9d6870f23fdd0523a30/Flask-Ask-0.9.8.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\george\appdata\local\temp\pip-install-b3jnkl\flask-ask\setup.py", line 8, in <module>
from pip.req import parse_requirements
ImportError: No module named req
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\george\appdata\local\temp\pip-install-b3jnkl\flask-ask\
I've looked online, upgraded setuptools and ez install but to no avail

pip install channels:"python setup.py egg_info" failed with error code 1

(some_virtual_env) # pip install channels
gives me:
Collecting channels
Using cached channels-2.0.2-py2.py3-none-any.whl
Collecting Django>=1.11 (from channels)
Using cached Django-1.11.10-py2.py3-none-any.whl
Collecting asgiref~=2.1 (from channels)
Using cached asgiref-2.1.5-py2.py3-none-any.whl
Collecting daphne~=2.0 (from channels)
Using cached daphne-2.0.3-py2.py3-none-any.whl
Requirement already satisfied: pytz in /root/.virtualenvs/codebench/lib/python2.7/site-packages (from Django>=1.11->channels)
Collecting async-timeout~=2.0 (from asgiref~=2.1->channels)
Using cached async-timeout-2.0.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-iii9a6/async-timeout/setup.py", line 1, in <module>
import pathlib
ImportError: No module named pathlib
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-iii9a6/async-timeout/
I tried upgrade setuptools as described in: https://stackoverflow.com/a/36025294/646732
It didn't work.
Tried:
(test_python3) # apt-get install python3
(test_python3) # alias python=python3
(test_python3) # pip install async-timeout
(test_python3) # python -V
Python 3.5.2
(test_python3) # pip install async-timeout
It gives me:
Collecting async-timeout
Using cached async-timeout-2.0.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-Dw6FjJ/async-timeout/setup.py", line 1, in <module>
import pathlib
ImportError: No module named pathlib
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-Dw6FjJ/async-timeout/
Not sure what else to check and install.
Run below command first
sudo pip install pathlib
then
pip install channels

How to install pysaxon using pip3?

I try to install library into my project using next way:
pip3 install -r requirements.txt
My requirements.txt contains:
six
Cython
git+https://github.com/ajelenak/pysaxon.git
But installations fails:
Collecting git+https://github.com/ajelenak/pysaxon.git (from -r /var/www/gost/gost/requirements.txt (line 20))
Cloning https://github.com/ajelenak/pysaxon.git to /tmp/pip-zkz6pq1u-build
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-zkz6pq1u-build/setup.py", line 8, in <module>
from Cython.Build import cythonize
ImportError: No module named 'Cython'
What is wrong?

Pip installer error

I am trying to install PyAutoGUI but every time i try i get the error message
C:\WINDOWS\system32>C:\Users\nicho\AppData\Local\Programs\Python\Python35-32\Scripts\pip install PyAutoGUI
Collecting PyAutoGUI
Using cached PyAutoGUI-0.9.33.zip
Collecting pymsgbox (from PyAutoGUI)
Using cached PyMsgBox-1.0.3.zip
Collecting PyTweening>=1.0.1 (from PyAutoGUI)
Using cached PyTweening-1.0.3.zip
Collecting Pillow (from PyAutoGUI)
Using cached Pillow-3.1.1-cp35-none-win32.whl
Collecting pyscreeze (from PyAutoGUI)
Using cached PyScreeze-0.1.8.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\nicho\AppData\Local\Temp\pip-build-jt08_ns2\pyscreeze\setup.py", line 6, in <module>
version=__import__('pyscreeze').__version__,
File "c:\users\nicho\appdata\local\temp\pip-build-jt08_ns2\pyscreeze\pyscreeze\__init__.py", line 21, in <module>
from PIL import Image
ImportError: No module named 'PIL'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\nicho\AppData\Local\Temp\pip-build-jt08_ns2\pyscreeze
Can anyone help me?
You should install the Python Image Library(PIL), using the command:
sudo pip install PIL --allow-external PIL --allow-unverified PIL
Check out the virtual environment for python packages. It is really user friendly in pycharm for example and you can test out packages before using up hard drive space.

Categories

Resources