I have a python 3.4 virtualenv and trying to install sphinx in it rises an error:
$ pip install sphinx
Collecting sphinx
Using cached Sphinx-1.3.1-py2.py3-none-any.whl
Collecting alabaster<0.8,>=0.7 (from sphinx)
Using cached alabaster-0.7.4.tar.gz
setuptools must be installed to install from a source distribution
I'm currently using my distribution's sphinx but It makes me pollute my conf.py and can't really find packages in autodoc.
Is it a known issue? Any workaround?
This is not a solution, but when I faced the same problem, it was a lot faster to reinstall the virtual environment than trying to solve the issue (I tried updating pip, setuptools, etc). After setting up a new virtualenv, I had no problem installing or updating packages again.
Related
Just as a background, I am an R user but learning python:
I have installed python libraries I want to get familiar with (pandas, numpy, Pytorch, tensorflow...), but when I start a new project, it does not detect the packages when I try to import and requests that I install them, even though I definitely did at one point. I am obviously making mistakes when installing them, but don't know what.
I use pip as a package manager if that is relevant
Have you attempted installing pip3 and using that in place of pip? I know I had some issues a while back where pip would install my packages for python 2.X and not 3.X.
libdoc2testbench is a tool of Robot Framework which supports importing test results to imbus testbench. Due to Robot Framework documentation, it is to be installed by
pip install robotframework-libdoc2testbench
I want to install it on Ubuntu 18.04; there I get the error:
Could not find a version that satisfies the requirement robotframework-libdoc2testbench (from versions: )
No matching distribution found for robotframework-libdoc2testbench
Best regards
Gerhard
You are probably calling pip from Python 2.7.
Make sure you use Python 3, for example with:
python3 -m pip install robotframework-libdoc2testbench
EDIT: You can download the .wheel or source tar from pypi.org and install with pip pointing to it (and then if needed, download other required packages).
However the solution to your problem is the Python version. From the project page, we see it needs Python 3.7.
When trying to install requests or literally anything using pip it'll collect the option and then give me this ERROR every time. I can't use pip to install anything.
C:\Users\evand>pip3 install requests
Collecting requests
ERROR: Could not install packages due to an EnvironmentError: Could not find a suitable TLS CA certificate bundle, invalid path: path/to/ca-bundle.crt
Version of pip:
C:\Users\evand>pip --version
pip 19.2.3 from c:\users\evand\appdata\local\programs\python\python38-32\lib\site-packages\pip (python 3.8)
Version of Python:
C:\Users\evand>py --version
Python 3.8.3
Current Environment Variables (If this is related at all)
I have also tried the 'Repair' option using the Python Installer as well as uninstalling then reinstalling as a custom installation with 'Add to PATH' and the other options. That didn't fix the issue, so I deleted pip along with every module installed on my computer then reinstalled pip. Nada. At this point, I can no longer program with this computer because I cannot import any module in any of my scripts. I am not sure why this issue suddenly arose. Help would be very much appreciated.
This worked for me:
Uninstalling the pip configuration file in %appdata%/pip/ then 'modifying' python using the python launcher.
I'm running pip v7.1.0 (latest as of this writing) and running into an issue where it's not caching at all.
Here is how I'm installing Django -
pip install --cache-dir=d:\pipcache django
The package installs successfully, but there is nothing cached. I've read the latest documentation and checked my AppData/Local path and it's empty. What I'm looking to do is have everything I install through pip cached, so all subsequent virtual environment creations are quick.
EDIT
Turns out that pip won't cache packages that have wheel files. I tried forcing pip to build the source --no-binary=django to no avail.
Having said that, how can I force pip to cache my requirements whether the maintainers have provided wheels or not?
Based on my understanding of pip, this should be the new default. Not sure why it isn't working, though.
Alternatively, I have to do this -
pip wheel --wheel-dir="D:/"-r reqs
pip install --no-index --find-links="D:/" -r reqs
Is this within a venv? If so, you may have to explicitly install wheel into the venv using pip install wheel. After that, pip should start automatically building/caching your wheels.
i'm trying to install pydot in python3 and i came up with some questions:
The packages referenced by pip3.3 are the same referenced by pip2.7 or there is a different repository for the packages ?
How does all the packaging/distribution work in python ?
What should i do for installing pydot through pip ?
Actually the creator say that python3 is not supported, but pydot is listed in pip3.3
A fork of pydot (https://bitbucket.org/prologic/pydot) working on Python3 exists, why it is not listed in pip?
Can I install pydot through pip?
Almost all package/program distribution in python is done with distutils. This is very good documented in the python documentation.
To your specific problem: pip usually searches the PyPI for the package and then downloads a distribution of that package. Most often this is a source-package and needs to be byte-compiled. If that succeeds the package is most probably compatible to the python version you're using, if it's not you will most probably get SyntaxErrors or something like that.
As i know PyPI has no other, ultimate-sure version classifiers.
So the most sure way to tell if the package is compatible, is to try to install it and then try if it works.