I have a virtualenv where I'm running python 2.7.13. I did install numpy a while ago. Today I wanted to install statsmodels as well in the same virtualenv. That's why I did (according to the webpage):
pip install -U statsmodels
and several packages where updated (numpy among others). I forgot that the -U forces to install the newest version. Since numpy was updated to numpy 1.13.3 I'm not sure if this broke a dependency. Is the forced version 1.13.3 not suitable for the virtualenv? If so how can I remove it and install the correct one. If I'm running
pip uninstall numpy
followed by a
pip install numpy
it says:
pip install numpy
Collecting numpy
Using cached numpy-1.13.3-cp27-cp27mu-manylinux1_x86_64.whl
Installing collected packages: numpy
Successfully installed numpy-1.13.3
Yes, the compatibility with Python is guaranteed: look at the filename of the wheel that is installed: numpy-1.13.3-cp27-cp27mu-manylinux1_x86_64.whl. That matches the Python version you're using (including your OS).
As for statsmodels and the upgraded NumPy: if statsmodels requires numpy 1.13.3, you're fine; that's the whole point of a virtualenv: it doesn't break any other dependencies/virtualenvs you might have set up. It is unlikely you have another package in the same virtualenv that requires a lower version of NumPy.
Related
I'm working on a Pyramid project that has to be deployed in a Debian 7 server.
The Debian 7 server has the python version 2.7.3 as from the archives repositories.
After creating a virtual environment with virtualenv command the pip version installed in this virtualenv is 1.1.
First thing noted: I can't upgrade pip with pip install --upgrade pip. The version is not updated and remains in 1.1 version.
After installing the OS packages needed to install the project I ran python setup.py install but I get the error:
Searching for zipp==0.5
Reading http://pypi.python.org/simple/zipp/
Couldn't find index page for 'zipp' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for zipp==0.5
error: Could not find suitable distribution for Requirement.parse('zipp==0.5')
So, the python setup.py install command could not recognize the zipp package.
I thought that this was related to the older version of pip (1.1). So I could update pip version successfully using the index-url option:
$ pip install --index-url https://pypi.python.org/simple --upgrade pip
That updated pip version from 1.1 to 20.3b1. Then I tried python setup.py install again, but the same error occurred.
What I could see is that, after updating pip version, the zipp==0.5.0 package is installed if I ran pip install zipp==0.5.
I'm new to Pyramid and the package installing using the setup.py module. I'm not understanding why I can install the zipp package with pip and can't with python setup.py install.
I'm not putting the content of setup.py here because I think it's not a problem of the setup.py script. With more recent versions of python and pip in an Ubuntu 18.04 machine the setup.py works like a charm.
Someone could explain how to solve this issue?
When you run python setup.py install directly, you are not using pip, so the version of pip you have installed is irrelevant. This command is antiquated, should not be used, etc, etc. The right answer is to use pip install . as a replacement for python setup.py install and to use pip install -e . as a replacement for python setup.py develop.
With respect to what you're seeing, when you run python setup.py install this using the version of easy_install bundled with setuptools to talk to PyPI and install dependencies. This should be avoided for a lot of reasons but just know that to override urls it uses they go in ~/.pydistutils.cfg and have nothing to do with pip. HTTPS is one problem that you looked at, another is that old versions of Python do not have the right CA trust store, nor support the minimum required TLS 1.2 to handshake with PyPI. So expect lots of problems using old tools - at the very least try to use pip instead of easy_install.
This installation is a nightmare!!!
Using:
conda install -c conda-forge pymc3
Will not work.
I then tried to install theano first (and its dependencies), found out the hard way that it works with python=3.5, NOT 3.6.
# Install theano reqirements
conda install numpy scipy mkl-service libpython m2w64-toolchain
# Install theano
conda install theano pygpu
# You are using a different python version (3.5) from the base installation,
# you must point to the right kernel for Jupyter:
conda install ipykernel
python -m ipykernel install --user
# Install & test on jupyter, spyder
conda install jupyter spyder qt
# Install PyMC3
pip install pymc3
Everything imports, but then when I run the code the 'NUTS' thing won't initialize...
Not sure which process worked for me but this is the step I took
reset my whole laptop
re-download wsl2
install conda
go to this directory
path_to_your_python_env>/Lib/site-packages/theano/misc/windows.py
delete or comment out following
params['shell'] = True
Even though it works, the compiler is extremely still slows
I am trying to install seaborn without using sudo. I have already installed on my python 2.7 and windows 7 setting with the following cmd commands :
pip install pandas
pip install xlrd
pip install matplotlib
and they all were installed like charm.
`pip install seaborn` did not work
i have attached the error message.[last lines of emssage][1]
You may be interested in installing precompiled python wheel binaries for Windows.
That, or use something like Anaconda python.
I have 2 versions of Python installed on my PC (Windows 7, 64Bit).
Python 2.7 Version installed with Anaconda
Python 3.6 Version installed directly from python.org (the "regular IDLE")
Now, i would like to install the necessary packages on the 3.6 using pip, but anaconda keeps on hijacking the command.
For example, on typing in the cmd window:
pip install numpy
and i get:
Requirement already satisfied: numpy in
c:\users\georges\anaconda2\lib\site_packages
Which is the case for python2.7, but i was trying to install it for version 3.6 installed without Anaconda.
I tried re-installing pip hoping it would erase the hijacking by Anaconda2 ... failed.
I am contemplating to remove Anaconda2 altogether although i risk that in windows, removing a programme does not necessaraly remove the dependencies.
Any lead please ?
I think what you are looking for is pip3 install pip3 and you should be able install packages for python3
It should come as standard with python3 installation setup.
First check if it is there with
where pip3
For any further issues check this post
You don't need to uninstall anaconda2. Both python versions can co-exist and libraries different managed by different package installers pip for python 2 and pip3 for python 3 respectively.
Hope this answers your question.
Install it with pip3, because you want it for python 3:
pip3 install numpy
I am working in a virtual environment and I am having trouble installing numpy and scipy. It is my understanding that I have to full install numpy before going to scipy, but I am having trouble installing numpy.
I usedpip install numpy and that installed numpy into my python2.7/site-packages/numpy directory, however, I am trying to run python setup.py install --user as stated here numpy build and I keep getting the error "this is the wrong file to run". I do not know where to go from here....and I still need to install scipy
numpy and scipy come pre-compiled with CentOS, just type:
sudo yum install numpy scipy
it is always harder to install from source code.