First of all I ran poetry update which seemed to work. To verify if it actually updated my poetry version I ran poetry --version which resulted in the following error:
Traceback (most recent call last):
File "C:\Users\XXX\.poetry\bin\poetry", line 17, in <module>
from poetry.console import main
ModuleNotFoundError: No module named 'poetry.console'
To solve this error, uninstalling poetry appeared the best option. So I tried uninstalling poetry by python get-poetry.py --uninstall and python install-poetry.py --uninstall. Both resulted in [Errno 2] No such file or directory. Furthermore, I tried poetry --uninstall which resulted also in the ModuleNotFoundError.
How can I uninstall poetry and why are my commands not working?
get-poetry.py and install-poetry.py are the installer scripts and have to be downloaded first. You can combine downloading and running in one line, e.g.:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - --uninstall
or
curl -sSL https://install.python-poetry.org | python3 - --uninstall
for uninstalling poetry. For uninstalling you have to use the same script you have used for installing.
Related
Ok so i'm trying to install scapy for python3, but ive been having some issues
when I enter this command:
pip install scapy
This is the output:
Collecting scapy
Using cached scapy-2.3.3.tgz
In the tar file C:\Users\MYNAME~1\AppData\Local\Temp\pip-oao3meyq-
unpack\scapy-2.3.3.tgz the member scapy-2.3.3/README
is invalid: unable to resolve link inside archive
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\MYNAME~1\AppData\Local\Temp\pip-build-
qjegdxw6\scapy\setup.py", line 36
os.chmod(fname, 0755)
^
SyntaxError: invalid token
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\MYNAME~1\AppData\Local\Temp\pip-build-qjegdxw6\s
capy\
So then I searched around and I tried using this:
pip3 install scapy-python3
But it just says that pip3 isnt a command, so im not sure what to do
Instead of pip3 use pip
pip install scapy-python3
It worked for me. pip3 is usually used if you have both python2 and python3 installed on your machine. It is uesd to distinguish between different pips in your system.
The pip3.exe will be in python3x/scripts/.
Check if there is a pip3.exe is available in your scripts folder.
If the above solution doesn't work for you then try giving the full path of correct pip.exe.
I am new to Python and I am trying to install pypgen.
As explained one the webpage, I first installed "samtools" (via brew install samtools as recommended).
Trying to install pypgen
I tried the 4 ways suggested by the author to install pypgen
$pip3.6 install pypgen
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/yv/n6rkh3sn5mn5qpsn87lvjw4m0000gp/T/pip-build-aQiBgg/pypgen/
$easy_install pypgen
Processing pypgen
error: Couldn't find a setup script in /Users/remi/Downloads/pypgen-0.2.1/pypgen
$pip3.6 install -e git+https://github.com/ngcrawford/pypgen.git
Could not detect requirement name, please specify one with #egg=
I downloaded "pypgen-0.2.1.tar.gz" from the pypgen website, uncompressed it, cd to the folder and did
$python setup.py install
Traceback (most recent call last):
File "setup.py", line 1, in <module>
import distribute_setup
ImportError: No module named distribute_setup
So, I did
$pip3.6 install distribute
but it did not solve the previous issue
Trying to Solve egg_info error
This egg_info error seems to be key. I tried to download this file and did
sudo python ez_setup.py
as recommended on this post but it did not solve the error messages above. I then tried
sudo pip3.6 install --upgrade setuptools
as recommended on this post but I keep receiving the same error messages when doing pip3.6 install pypgen
I am using Python 3.6 but I also have the version 2.7 installed. I tried everything with both versions (pip3.6 and pip2.7) and get the same errors. I am on MAC OS X 10.11.3
I am new to Python and I am trying to install recsys package.
http://ocelma.net/software/python-recsys/build/html/installation.html
For this i need to install some pre-requiste packages, so i have to run this using pip
pip install csc-pysparse networkx divisi2
But whenever i run this i get the following in logs
Collecting csc-pysparse
Using cached csc-pysparse-1.1.1.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\64\AppData\Local\Temp\pip-build-wn7_65_9\csc-pysparse\
setup.py", line 33
print 'setuptools module not found.'
^
SyntaxError: Missing parentheses in call to 'print'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\i054564\
AppData\Local\Temp\pip-build-wn7_65_9\csc-pysparse\
I checked that setuptools exist in my python installation here
C:\Python34\lib\site-packages
I have ran everything from unstinalling setuptools to install it again, upgrade command, but it does not work.
Not able to figure out why setuptools is not found. Is it not found in the path of where pip resolves it from ?
cheers,
Saurav
The code triggering the error is Python 2-specific and is illegal in Python 3.
Apparently, csc-pysparse doesn't support Python 3 (its README only mentions 2.6) and looks abandoned (6 years since last commit).
Some guys out there suggest replacing it with SciPy.
The error is coming from the installation code of recsys package. In order to avoid this error, you need to install setuptools separately.
For debian machines, the below command will work.
sudo apt-get install python3-setuptools
For other machines, please checkout installation instructions at the link
Once setuptools package is installed, you can proceed with csc-pysparse installation.
Im using the following travis-ci configuration
language: python
env:
- DJANGO=1.4
- DJANGO=1.5
- DJANGO=1.6
python:
- "2.6"
- "2.7"
install:
- sudo pip install Django==$DJANGO
- sudo pip install .
script:
- cd autotest
- python manage.py test ...
But in everytime the tests are executed, I run into the following issue:
$ python manage.py test ...
Traceback (most recent call last):
File "manage.py", line 8, in <module>
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management
The command "python manage.py test ..." exited with 1.
As i said on irc,
You are running pip install as root. More than that, sudo will reset the environment before finding and running pip. This will mean your pip install is not into the virtualenv that travis provides, but into the global site-packages.
When you do python manage.py test you are using the python binary provided by a virtualenv. However virtualenv will not look in the system site-packages. So it cannot see the Django you installed into the system site-packages.
Easy_install and Pip doesn't work anymore on python 2.7, when I try to do:
sudo easy_install pip
I get:
Traceback (most recent call last):
File "/usr/bin/easy_install", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/bin/lib/python2.7/site-packages/distribute-0.6.19-py2.7.egg/pkg_resources.py", line 2713, in <module>
parse_requirements(__requires__), Environment()
File "/usr/bin/lib/python2.7/site-packages/distribute-0.6.19-py2.7.egg/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: distribute==0.6.15
And when I try:
sudo pip install [package]
I get:
Traceback (most recent call last):
File "/usr/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/bin/lib/python2.7/site-packages/distribute-0.6.19-py2.7.egg/pkg_resources.py", line 2713, in <module>
parse_requirements(__requires__), Environment()
File "/usr/bin/lib/python2.7/site-packages/distribute-0.6.19-py2.7.egg/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pip==0.8.2
I've already install both of them (and yes, first deleted them), but no result...
Thanks!
(I tried already this post)
I had this issue where python's distribute package wasn't installed for some reason. After following the instructions on python-distribute, i got it working.
install the distribute package as follows:
$ wget https://web.archive.org/web/20100225231201/http://python-distribute.org/distribute_setup.py
$ python distribute_setup.py
EDIT: http://python-distribute.org/distribute_setup.py no longer works:
hopefully this will resolve your problem with running
$ sudo easy_install
Happy Coding!
If you installed a new version of easy_install through Distribute, the new command may have been installed in another directory, most likely /usr/local/bin/. But the traceback shows you were using /usr/bin/easy_install. Try this:
sudo /usr/local/bin/easy_install ...
Try
sudo easy_install Distribute
and if that exists, but is too old
sudo easy_install -U Distribute
Looks like either Distribute/setuptools (it's old name) is messed up or Python package settings. If either of these do not help, try removing the full Python 2.7 installation and reinstall everything from the scratch.
Possible reasons for the mess is that you have used both sudo easy_install / sudo pip and Linux distribution packages to mix and match system-wide installation packages. You should use virtualenv instead if you use pip/easy_install (no sudo needed)
http://pypi.python.org/pypi/virtualenv
I had a similar problem, but things were working fine as root. In my case, I found that the permissions on the python packages were not readable by the ID I was running the command under.
To correct it, I ran the following command to open the permission for read and execute to all users:
sudo chmod o+rx -R /usr/local/lib/python2.7/dist-packages/*.egg
I had similar issue when trying to install package via pip with python 3.6 on windows. (pip is supposed to work out of the box with this install)
The problem was not running as administrator.
Running cmd as administrator and then installing my package worked:
python -m pip install pylint
I was trying to get pip to work on the 2.7.0 version, but it seems like it doesn't come with the easy_install/pip files (Script folder in main directory), installing 2.7.13 solved the problem for me.