Pyinstaller cant find setuptools - python

I am trying to install Pyinstaller 3.6 using Pip 20.0.2 with Python 3.7.4 in an Anaconda3 environment but it always says it cant find the setuptools dependency, despite it showing up with 'pip list' as setuptools 46.1.3.
key points:
Machine doesn't have access to internet so if it cant find the package, it will fail.
Tried the following versions of the libraries; pip (10.0.01 and 20.0.2), pyinstaller (3.5 and 3.6), setuptools (41.0.0, 45.0.0, 46.1.3)
All installs where done through the anaconda prompt with admin access.
all packages have been downloaded from PyPi
installed as 'pip install name_of_wheel.whl'

Related

Terminal has different Python version in PyCharm

My current Python version is 3.8, but I do also have python 3.6 installed in another directory. My IDE is PyCharm. I set up a new project using version 3.6 so I can use an older version of Tensorflow, namely Tensorflow==2.0.0b1. However, when using pip install on this project it still recognizes version 3.8. My question is how can I pip install to my my 3.6 directory and not the 3.8 site packages folder.
Here is the error:
C:\Users\my_folder_name\PycharmProjects\Anomaly_Dectection>pip install tensorflow==2.0.0
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement tensorflow==2.0.0
ERROR: No matching distribution found for tensorflow==2.0.0
WARNING: You are using pip version 21.0.1; however, version 21.2.1 is available.
You should consider upgrading via the 'c:\program files\python38\python.exe -m pip install --upgrade pip' command.
I need the pip install to go here:
C:\Users\folder_name\AppData\Local\Programs\Python\Python36\Lib\site-packages
P.S: I set up a venv with Python 3.6 for this new project.
It should work, when you run pip from the script folder:
C:\Users\folder_name\AppData\Local\Programs\Python\Python36\Scripts
If there is no pip3 in your current directory, windows is looking at your PATH variable and i guess, it takes pip3 from the newest python, not 3.6.

Can't get pip to work after installing newer python

I installed python 3.8 in a different location than 3.7, and later uninstalled 3.7 while trying to troubleshoot issues with pip. I can't get pip to respond to install any modules now. It keeps referencing its old python 3.7 location and I don't know how to make it focus on the 3.8 installation location.
Here are the errors I'm encountering:
>pip --version
Fatal error in launcher: Unable to create process using '"c:\program files\python37\python.exe" "C:\Program Files\Python37\Scripts\pip.exe" --version': The system cannot find the file specified.
>python get-pip.py
Collecting pip
Using cached pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.1.1
Uninstalling pip-20.1.1:
Successfully uninstalled pip-20.1.1
Successfully installed pip-20.1.1
Now when I call pip --version is gives me the original error.
And just for more information, here are two more calls which might help troubleshoot.
>which python
/c/Users/patch/AppData/Local/Programs/Python/Python38/python
>python --version
Python 3.8.3
I just want to be able to use pip again to install modules. I'm learning some python and this pip issue is really slowing me down.
I'm open to completely uninstalling python and scrubbing the system of traces of both I just don't know what's the safest and most likely to work option.
Use
python -m pip --version
python -m pip install PACKAGE_NAME
This will use the pip that is associated with the newer python.
I suggest using the python -m pip install command over pip install because it is more clear which python version is being used.
I'd recommend scrubbing 3.7 and 3.8 from your system, then reinstalling the versions you need with pyenv (if you're using the Windows Subsystem for Linux) or pyenv-win (if not on WSL) to manage multiple Python versions. It checks the directory-specific version of Python that you've set before deciding which version's executables to use for Python, pip, etc. This solution will also work in the long term for future versions of Python you may want to install.
Future installations using pyenv or pyenv-win would involve commands like pyenv install 3.8.1. For a full list of available versions you can run pyenv install -l.
#jakub's solution will work if you want an immediate, but short-term, fix.

Pycharm install package error

I'm trying to install the wxPython package using Pycharm's Project Interpreter on my mac. I have been able to install other packages in the past, but with this package I get an error:
Any ideas? I've checked, and I have both read and write permissions to both the ./pip and ./pip/http directories, and pip is up to date.
Try using homebrew instead.
Once brew is installed, just type 'brew install wxpython' in your terminal to install wxPython.

Installing requests-kerberos on Windows

Is there any way to install requests-kerberos on Windows?
When I try to install it with pip I have the following error:
py -m pip install requests-kerberos
ImportError: No module named 'commands'
Command "python setup.py egg_info" failed with error code 1 in C:\Users\user1\AppData\Local\Temp\pip-build-n8s_inn\kerberos
I would be grateful if anyone knew another kerberos module. I'm using Python 3.4 and Windows 8.
Best regards.
The commands module was deprecated in python 2.6.
Thus, the issue appears to be a problem with your pip installation, and not with requests-kerberos.
There are a few things you can try, but I would focus on ensuring pip is working correctly. While you could install the package manually, you are really just pushing the pip problem down the road until the next time you install a package.
Ensure pip is installed correctly.
Use the pip command to ensure you are running pip in the python 3.4 context: (Note, this is my output, yours will be different because you are on Windows and running 3.4)
$ pip --version
pip 1.5.6 from /Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg (python 2.7)
Additional information about pip can be found here.
Download and install manually
Download the package manually from the pypi repo.
Download the .tar.gz
Extract the tar.gz and run python setup.py install

Install python-igraph with the anaconda distribution (windows)

I have problems to install python-igraph on the anaconda distribution of python.
If I write pip install python-igraph (with the admin privileges) in the anaconda command, the installation doesn't work.
You can download a wheel installer from http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-igraph and then install that wheel in your environment via
conda install pip
pip install *.whl
See this stackoverflow answer for ways to convert a *.exe into a wheel which can be installed as above: Can I install Python windows packages into virtualenvs?
Check the documentation on their site: http://igraph.org/python/
It says that you need to download the .msi installer, pip does not work under windows. That is probably because you need a C compiler and windows does not supply one by default.

Categories

Resources