PyCharm not using newest version of pip - python

I would like to preface that I am very inexperienced with programming and I am probably going to use some incorrect terminology, so bear with me. I am pissed off at bots buying out stock of graphics cards in seconds, leaving me unable to buy any, so I've decided to fight fire with fire. I will not be scalping graphics cards. I have morals.
When I run py -m pip install --upgrade pip in the terminal, it returns Requirement already satisfied: pip in c:\users\awsmcube\pycharmprojects\3060tibot\venv\lib\site-packages (21.0.1). When I run py -m pip --version, it returns pip 21.0.1 from C:\Users\AWSMcube\PycharmProjects\3060tibot\venv\lib\site-packages\pip (python 3.7).
However, when I try running pip install Scrapy, it returns a long error code: Command "C:\Users\AWSMcube\PycharmProjects\3060tibot\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\AWSMcube\\AppData\\Local\\Temp\\pip-install-97nzwr21\\cryptography\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read() .replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\AWSMcube\AppData\Local\Temp\pip-record-4yro5d1x\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\AWSMcube\PycharmProjects\3060t ibot\venv\include\site\python3.7\cryptography" failed with error code 1 in C:\Users\AWSMcube\AppData\Local\Temp\pip-install-97nzwr21\cryptography\, along with this suggestion: You are using pip version 10.0.1, however version 21.0.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command. This brings me back to upgrading pip, which I have done as seen in the previous paragraph.
Why is it telling me that I am using pip version 10.0.1 when I already installed pip version 21.0.1? I have already tried restarting PyCharm.

Related

How to install pyaudio? pip Install pyaudio, Giving error

pip install pyaudio
Giving error,
ERROR: Command errored out with exit status 1: 'c:\users\admin\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\admin\AppData\Local\Temp\pip-install-q34_lfl5\pyaudio\setup.py'"'"'; file='"'"'C:\Users\admin\AppData\Local\Temp\pip-install-q34_lfl5\pyaudio\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\admin\AppData\Local\Temp\pip-record-q8jvhxle\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\admin\appdata\local\programs\python\python38-32\Include\pyaudio' Check the logs for full command output.
Regards,
Neha
I had the same problem. you should install pyaudio offline.
First, download the whl file from here then install it.
pip install <downloaded file here>
In my case:
pip install PyAudio-0.2.11-cp36-cp36m-win_amd64.whl
Windows wheels are the most popular packages for nearly all modern Python versions, including the latest PyAudio.
please attention, you should download the version is capable with your system. If you got error like this:
ERROR: PyAudio-0.2.11-cp39-cp39-win32.whl is not a supported wheel on this platform.
try another file until installing successfully.
PyAudio
Includes ASIO, DS, WMME, WASAPI, WDMKS support.
PyAudio‑0.2.11‑cp39‑cp39‑win_amd64.whl
PyAudio‑0.2.11‑cp39‑cp39‑win32.whl
PyAudio‑0.2.11‑cp38‑cp38‑win_amd64.whl
PyAudio‑0.2.11‑cp38‑cp38‑win32.whl
PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl #this version worked for me
PyAudio‑0.2.11‑cp37‑cp37m‑win32.whl
PyAudio‑0.2.11‑cp36‑cp36m‑win_amd64.whl
PyAudio‑0.2.11‑cp36‑cp36m‑win32.whl
...
Check out this answer too.
Go to website and download the version of pyaudio as per your Python version from here.
Browse the directory where the file is downloaded.
Open command prompt there
Type command pip install <filename.extension> in my case pip install PyAudio-0.2.11-cp36-cp36m-win_amd64.whl
It will install
Comment if facing issues in above process.
your python version is 3.7 or obove Try
pip install pipwin
pipwin install pyaudio

How to fix ‘“ERROR: Command errored out with exit status 1:” when trying to install watchdog using pip

I am revisiting the python language and experiencing difficulty setting up my environment.
I am using
- Mac Mojave (10.14)
- python 2.7.10 (packaged with the system)
- python 3.7.4 (installed using homebrew)
- homebrew 2.1.14
- pip 19.2.3
I encounter an error message when attempting to install watchdog via pip. I believe the error is caused by pip attempting to install in python 2.7 folders (without sufficient permissions) instead of the python 3 folder
I have tried uninstalling, reinstalling and upgrading python 3
I encounter the following error message when attempting to install watchdog via pip
1 error generated.
Error compiling module, falling back to pure Python
running install_lib
creating /Library/Python/2.7/site-packages/yaml
error: could not create '/Library/Python/2.7/site-packages/yaml': Permission denied
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4d/spq3r5t92654252ql994_l540000gr/T/pip-install-nqmq6O/PyYAML/setup.py'"'"'; __file__='"'"'/private/var/folders/4d/spq3r5t92654252ql994_l540000gr/T/pip-install-nqmq6O/PyYAML/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/4d/spq3r5t92654252ql994_l540000gr/T/pip-record-g8Qjzh/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
You need to upgrade setuptools and pip. You can do that by running:
pip install -U pip setuptools
When you run pip install, exactly which pip gets used depends on several things like your PATH, shell, shell configuration, and operating system.
The best thing to do is invoke pip using <python> -m pip where <python> is the Python that you want to install the package for. For example, if you run python3 to use the Python that you want to install the package for, then run python3 -m pip.
If you're running python3 -m pip install ... and getting permission errors, then you can execute python3 -m pip install --user ..., which will install it to your user site-packages directory and available when you execute python3 under your user.

how to invoke jupyter notebook if I've installed python35 and python27

I have python27 and python35 installed on my mac. I've used alias python2 for python27 and python for python35. When typing "python" in the terminal, python35 shows up.
I also have Anacoda.
By right I should have pip3 and jupyter notebook installed.
I was trying to use jupyter notebook.
I typed"jupyter notebook" in terminal, I got
-bash: jupyter: command not found
I typed python -m pip install jupyter
Requirement already satisfied: jupyter in /Users/xxv/anaconda/lib/python3.5/site-packages
Then I typed: pip3 install jupyter, according to the docs
I got
-bash: pip3: command not found
pip install jupyter, I got:
"/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/vv/243h_5ks0xs0cmt62rx7swlm0000gn/T/pip-build-VsnCwB/MarkupSafe/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/vv/243h_5ks0xs0cmt62rx7swlm0000gn/T/pip-Fa2r4V-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/vv/243h_5ks0xs0cmt62rx7swlm0000gn/T/pip-build-VsnCwB/MarkupSafe/
pip show pip, got:
Name: pip
Version: 9.0.1
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: python-virtualenv#groups.google.com
License: MIT
Location: /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg
Requires:
Your active PIP is for python2.7
Location: /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg
If you have python3.5, pip would have come automatically with it.
try,
python3 -m pip install jupyter to have jupyter properly installed using python3's PIP.
consider changing your default python and PIP version that gets triggered when you do python or pip
you can use alias for doing the above,
alias python='/usr/bin/python3.x'
alias pip='python3 -m pip'

Installing cx_Freeze 5.0.2 with Python 3.5.2

I am running ubuntu 16. I have both python 2.7 and 3.5 installed. I want to install cx_freeze latest version for python3. I downloaded the package from their website but couldn't run the setup.py file as it always gave me errors. Also i have installed pip3, but it still doesn't work for me. all the answers online are for older version of cx_freeze so a fresh answer for the new version will be helpful.
I install and upgrade pip3 with:
sudo -H install --upgrade pip
then I try to install cx_freeze with:
pip3 install cx_Freeze .
then i get the following errors:
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ngco46uq/cx-Freeze/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-q3n3cd2r-record/install-record.txt --single-version-externally-managed --compile"
failed with error code 1 in /tmp/pip-build-ngco46uq/cx-Freeze/
also anyone can tell me any other method to do so ?
Try installing Pip3 using :
sudo apt-get install python3-pip
If you have Python 2.7, you can try alternatives like py2exe

Cannot download and install scikit-learn

I am pretty new to python. I want to use KMean code, and I want to install scikit-learn or sklearn.
I used this code to attempt install these packages:
pip install -U sklearn
pip install -U scikit-learn
But I got this error:
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_reihaneh/sklearn/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-89YQB7-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_reihaneh/sklearn
Storing debug log for failure in /home/reihaneh/.pip/pip.log
What is the cause of the problem?
pip install -U <package>, short for pip install --upgrade <package>, will upgrade <package> to the most recent stable version in the pip repo.
pip install <package> will install the most recent stable version of <package> in the pip repo.
The difference is upgrading vs. installing. You want the latter.
scikit-learn requires scipy and numpy, so here are the commands you should issue:
pip install numpy
pip install scipy
pip install scikit-learn
If you already have any of the dependencies, just plug in a -U between pip install and the package name.
If you're using Python 3.x, replace pip with pip3.

Categories