I am trying to install ipykernel onto my virtual venv enrioment on windows. I typed python -m pip install ipykernel but I get the following error:
ERROR: Could not build wheels for psutil, pyzmq, which is required to install pyproject.toml-based projects
I tried downgrading using the command pip install pip==21.3.1 but I did not find any luck downloading pip onto my venv afterward either. I also tried using the command python -m pip install ipykernel which also did not work.
Let me know if you have any other ideas!
Try installing from source
git clone
cd ipykernel
pip install -e ".[test]"
Related
I'm sorry if this is a repeat question, but whenever I search force uninstall of pip I get something like a pip uninstall command. What I want is a way to uninstall the package pip (and reinstall). when I run python3 -m pip uninstall pip setuptools in a conda enviroment I get this error:
Not uninstalling pip at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'pip'. No files were found to uninstall.
Found existing installation: setuptools 45.2.0
Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'setuptools'. No files were found to uninstall.
I also get the same error in the base enviroment when I run /usr/lib/python3 -m pip uninstall pip setuptools.
However when I'm outside of a virtual enviroment (base) and I just run python3 -m pip uninstall pip setuptools, I get:
/home/cameron/anaconda3/bin/python3: No module named pip
I could just remove the file but I want to avoid if that would be problematic.
The problematic thing is I can still install things with pip in my base enviroment but I can't call python programs in my virtual enviroments anymore nor install new ones with pip (perhaps able to with conda) since it defaults to the packages installed with this pip even in a venv.
this should remove pip from your active conda environment
conda uninstall pip --force
I was finally able to remove with sudo apt-get purge python3-pip
I have the same problem.
pyhton(3.9.1).
using virtual environmnet (venv).
installed django.
updated:
setuptools: pip install --upgrade setuptools,
pip(20.3.3): py -m pip install --upgrade pip
wheel: python -m pip install --upgrade pip setuptools wheel
(latesed version for today(30/12/20)).
Tried to use: python -m pip install -U channels.
installed "Microsoft Visual C++ Build Tools"
Tried the self installing twisted: https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
All done, but still not working.
Also tried pip install:
pip install pytype
pip install django-channels.
The django-channels, but when runnig on PyCharm, it recognize channels but not: channels.layers.
Can anyone help?
I managed to install it:
just removed python, and installed instead Anaconda 3.
When I run the following command within my virtual env
sudo pip3 install -r requirements.txt
It says that the packages were successfully installed, but when I try to run or import the packages, it can not find them.
pip3 show returns nothing.
However, when I manually run
sudo pip3 install package-name
It installs the package just fine and it works.
Why is pip install -r requirements.txt not working? It always worked in the past. Now that I reinstalled Python it stopped working..
System:
Ubuntu 14.04
Python changed from 3.4 to 3.6.2
requirements.txt
Django==2.0.8
django-debug-toolbar
channels
Debugging in Terminal:
EDIT: This makes no sense.
pip3 install -r requirements.txt
Requirement already satisfied: pycparser in /usr/local/lib/python3.6/site-packages (from cffi!=1.11.3,>=1.8->cryptography>=2.7->autobahn>=0.18->daphne~=2.3->channels==2.3.0->-r requirements.txt (line 79)) (2.19)
$ pip3 --version
pip 19.2.3 from /home/dominic/Desktop/projects/printrender/env/lib/python3.6/site-packages/pip (python 3.6)
I install packages in my Virtual Environemnt using pip3 install -r requirements and it says that they are already installed, but when I run Pip Freeze, it returns nothing, as if nothing is installed.
Pip3 install -r requirements is placing my packages in my local packages python packages, and pip freeze is referencing my virtual env packages.
pip is not installing this packages in the correct place
I don't think you should use sudo when you're using a virtual environment. Try without.
I think you created a virtual environment for python 2 by mistake since pip3 is used from /usr/local/lib/python3.6 instead of in the env. You can create the virtual environment specifically for python3 by using the command
virtualenv -p python3 env
Could you try creating a new virtual environment with the command above and see if it works?
Using sudo was part of the issue and some of the packages in my requirements.txt were causing errors with the latest version of pip.
When you use sudo, you installed your packages globally. This must solve your problem.
sudo su
. venv/bin/activate
pip install -r requirements.txt
First, I run
pip install virtualenv
and later, I run
pip install --user virtualenv
So, this is what I have now
$ which -a virtualenv
/Users/admin/.local/bin/virtualenv
/usr/local/bin/virtualenv
This is my default virtualenv
/Users/admin/.local/bin/virtualenv
Now I want to uninstall, this,
/usr/local/bin/virtualenv
What should I do?
Thanks!
I tried
pip uninstall virtualenv
It removed /usr/local/bin/virtualenv, the system wide package.
The package I installed using --user flag, which cannot be uninstalled.
I just manually removed the folder.
See this thread.
How to uninstall a package installed with pip install --user
I need to run python scripts from my Electron app. I have to set up a python virtual env post installation. Something like the following (but hopefully platform agnostic).
cd /Applications/z.app/Contents/Resources/app.asar.unpacked
brew reinstall python
brew upgrade python
pip3 install --upgrade pip
pip3 install virtualenv
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
Step one:
The approach I took is to create a a python native app using py2app alongside an electron app
But in that too faced few issues as I was using anaconda.
Following this helped https://github.com/stuarteberg/helloworld
Step two:
2(a)
You will encounter pyqt not found error
ImportError: No module named PyQt4.QtGui
then do
conda install pyqt=4
Restart terminal
2(b)(optional)
Above repo is in pyqt4, If you need pyqt5:
To install pyqt5 on Mac first install macports(https://guide.macports.org/#installing.macports), then do
unset PYTHONPATH
brew install sip --with-python3
brew install pyqt --with-python3