Python 3.9.5 Here I go:
deactivate
rm -rf venv/
python -m venv venv
source venv/bin/activate
python -V
python -m pip install --upgrade pip
python -m pip install wheel
fine.
look at the development.txt:
mariadb==1.0.5
python-binance==1.0.10
python-decouple==3.3
PyMySQL==0.10.1
mplfinance==0.12.7a4
newtulipy==0.4.6
autobahn==21.3.1
PyQt6==6.1.1
pyqtgraph==0.12.1
PyOpenGL==3.1.5
PyDispatcher-2.0.5
shortuuid==1.0.1
try this: development.txt (has is PyDispatcher==2.0.5).
Try this for your self:
python -m pip install -r requirements/development.txt
ERROR: Could not find a version that satisfies the requirement PyDispatcher-2.0.5 (from versions: none)
ERROR: No matching distribution found for PyDispatcher-2.0.5
Why?
But on his own:
pip install PyDispatcher
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: PyDispatcher in /home/jonsl/.local/lib/python3.9/site-packages (2.0.5)
Is fine.
Why?
Thank you people.
Turns out that:
pyqtgraph==0.12.1
needs
pyqtgraph==0.12.2
instead with:
PyQt6==6.1.1
Also, never use from ... import ... unless you need.
Related
Python 3.9.5 Here I go:
deactivate
rm -rf venv/
python -m venv venv
source venv/bin/activate
python -V
python -m pip install --upgrade pip
python -m pip install wheel
fine.
look at the development.txt:
mariadb==1.0.5
python-binance==1.0.10
python-decouple==3.3
PyMySQL==0.10.1
mplfinance==0.12.7a4
newtulipy==0.4.6
autobahn==21.3.1
PyQt6==6.1.1
pyqtgraph==0.12.1
PyOpenGL==3.1.5
PyDispatcher-2.0.5
shortuuid==1.0.1
try this: development.txt (has is PyDispatcher==2.0.5).
Try this for your self:
python -m pip install -r requirements/development.txt
ERROR: Could not find a version that satisfies the requirement PyDispatcher-2.0.5 (from versions: none)
ERROR: No matching distribution found for PyDispatcher-2.0.5
Why?
But on his own:
pip install PyDispatcher
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: PyDispatcher in /home/jonsl/.local/lib/python3.9/site-packages (2.0.5)
Is fine.
Why?
Thank you people.
Turns out that:
pyqtgraph==0.12.1
needs
pyqtgraph==0.12.2
instead with:
PyQt6==6.1.1
Also, never use from ... import ... unless you need.
I tried "pip install mkl-fft"
but could not finish.
ERROR: Could not find a version that satisfies the requirement mkl-fft (from -r requirements.txt (line 11)) (from versions: none)
ERROR: No matching distribution found for mkl-fft (from -r requirements.txt (line 11))
my env is
conda create -n myenv1 python=3.5
python -m pip install --upgrade pip
now pip ver is "20.1.1"
Further, I tried python 3.7.
I can`t install too.
do you have any Idea?
thank you.
It seems you're not the only one that's seeing this issue. From the project's github page, they actually direct to use a conda install -c intel mkl_fft.
Further it looks like there are multiple issues open for pip install problems. Here's one, and another. I would recommend trying the conda install first.
I am hitting a unique version of the well documented Virtualenv-Pip bug discussed in answers like here and here. In these cases the issue was pip was installing in a global folder, in some cases because the shebang in one of the pip scripts was wrong, in others because the line 42 in the bin/activate script was wrong, but it always installed globally.
My issue is different: within my virtual environment pip install <package> works as desired (installing locally), but pip install -r requirements.txt installs into the void. For example:
pip install scipy
then looking at the contents of /home/user/software/project/venv/lib/python3.6/site-packages i get the result:
easy_install.py
numpy
numpy-1.16.1.dist-info
pip
pip-19.0.2.dist-info
pkg_resources
__pycache__
scipy
scipy-1.2.1.dist-info
setuptools
setuptools-40.8.0.dist-info
wheel
wheel-0.33.0.dist-info
However, when in the same virtual environment, I run pip install -r requirements.txt, where the requirements.txt asks to install numpy, Cython, sklearn, matplotlib, and argparse, and which outputs:
Collecting Cython (from -r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/16/98/49aa24054e99e9c7734e49d6996662f547e4e2faae0051d35fbbc461afa4/Cython-0.29.5-cp36-cp36m-manylinux1_x86_64.whl (2.1MB)
100% |████████████████████████████████| 2.1MB 23.6MB/s
Collecting numpy (from -r requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/f5/bf/4981bcbee43934f0adb8f764a1e70ab0ee5a448f6505bd04a87a2fda2a8b/numpy-1.16.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting sklearn (from -r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/1e/7a/dbb3be0ce9bd5c8b7e3d87328e79063f8b263b2b1bfa4774cb1147bfcd3f/sklearn-0.0.tar.gz
Collecting matplotlib (from -r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/71/07/16d781df15be30df4acfd536c479268f1208b2dfbc91e9ca5d92c9caf673/matplotlib-3.0.2-cp36-cp36m-manylinux1_x86_64.whl (12.9MB)
100% |████████████████████████████████| 12.9MB 6.3MB/s
Collecting argparse (from -r requirements.txt (line 5))
Downloading https://files.pythonhosted.org/packages/f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl
This results in no new additions to the local site-packages. What's more when I try to see where they installed, there are no site-packages directories in /usr/lib/python2.7, /usr/local/lib/python2.7, /usr/lib/python3, /usr/lib/python3.6, usr/lib/python3.7, ~/.local/lib/python3.6/, or ~/.local/lib/python2.7/.
To verify this, when I run:
find /usr/ -name "Cython"
I get an empty result.
Any advice? I can write a bash script that literally calls pip install instead, but that seems so sloppy, and I feel like I should fix this before it becomes worse.
NOTES:
My machine is on 18.04.1, which has python3.6.7 as python3 and python 2.7.15 as python2 installed as machine defaults, I installed pip for both with sudo apt install python-pip and sudo apt install python3-pip, and this virtual environment was created with virtualenv -p python3 venv
My requirements.txt:
Cython
numpy
sklearn
matplotlib
torch>=0.4.1
torchvision>=0.2.1
argparse
quadprog
Full output from pip install -r requirements.txt
So this is a partial answer, but I figured out at least the problem even if I don't entirely understand why. When I changed:
virtualenv -p python3 venv
to
virtualenv -p /usr/lib/python3.6 venv .
pip install -r requirements.txt worked, yielding the correct site-packages.
Again, I do not know why this worked, but it did. I just tried it again with a different python version with less luck though, so I'm not entirely sure if this is a universal fix. I will edit this answer when I have a better explanation.
To the best of my knowledge pip install .[extras_require here] has always worked. I can't find in any documentation when that feature was added, but I've never had any problem even on very old machines.
Is pip definitely the problem here. I could add 'pip install --upgrade pip', but I don't have merge rights to the repo that is currently having the problem.
From setup.py
extras_require={
'test': ['flake8', 'pytest>=2.9.0'],
},
In python 2.7.9
$ python --version
Python 2.7.9
$ pip --version
pip 6.0.7 from /home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages (python 2.7)
$ pip install .[test]
Collecting .[test]
Could not find any downloads that satisfy the requirement .[test]
No distributions at all found for .[test]
The command "pip install .[test]" failed and exited with 1 during .
From 3.5.2:
$ python --version
Python 3.5.2
$ pip --version
pip 9.0.1 from /home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages (python 3.5)
$ pip install .[test]
Processing /home/travis/build/Brian-Williams/repo_python
Collecting flake8 (from refactor-me==0.1.0)
Downloading flake8-3.3.0-py2.py3-none-any.whl (66kB)
100% |████████████████████████████████| 71kB 6.1MB/s
Requirement already satisfied: pytest>=2.9.0 in /home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages (from refactor-me==0.1.0)
Collecting pycodestyle<2.4.0,>=2.0.0 (from flake8->refactor-me==0.1.0)
Downloading pycodestyle-2.3.1-py2.py3-none-any.whl (45kB)
100% |███████████████���████████████████| 51kB 10.6MB/s
Collecting mccabe<0.7.0,>=0.6.0 (from flake8->refactor-me==0.1.0)
Downloading mccabe-0.6.1-py2.py3-none-any.whl
Collecting pyflakes<1.6.0,>=1.5.0 (from flake8->refactor-me==0.1.0)
Downloading pyflakes-1.5.0-py2.py3-none-any.whl (225kB)
100% |████████████████████████████████| 225kB 7.1MB/s
Requirement already satisfied: py>=1.4.29 in /home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages (from pytest>=2.9.0->refactor-me==0.1.0)
Installing collected packages: pycodestyle, mccabe, pyflakes, flake8, refactor-me
Running setup.py install for refactor-me ... - done
Successfully installed flake8-3.3.0 mccabe-0.6.1 pycodestyle-2.3.1 pyflakes-1.5.0 refactor-me-0.1.0
For your version of pip you need to run
pip install -e .[test]
to be able to install extras from a directory
I got merge access. Adding upgrade pip to the install stage of .travis.yml fixed it:
install:
# update pip to ensure extras_require format is supported
- 'pip install --upgrade pip'
- 'pip install ".[test]"'
From the successful run replacing 6.0.7 with pip-9.0.1 was the delta.
I was unable to simply pip install pandas because my system already had it installed for python3. But I expected that pip would attempt to install for python2; pip3 should install for python3.
Why do I have to specify the python2 interpreter to use pip?
➜ ~ pip install pandas
Requirement already satisfied: pandas in /usr/local/lib/python3.5/site-packages
Requirement already satisfied: numpy>=1.7.0 in /usr/local/lib/python3.5/site-packages (from pandas)
➜ ~ python2 -m pip install pandas
Collecting pandas
Downloading pandas-0.19.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (11.9MB)
...
pip will call the pip that is in the default version of python on your system. It is not specific to python2. Since python3 is default on your system you need to specify python2 -m pip to access the python2 version.