Hello. I can't install several moduls using pip3.6 install --user somemodule
Get Attribute error
https://drive.google.com/open?id=1qcMH1larOuLRUfshfOqOJz_JBD5OOl0F
Hello. I can't install several moduls using pip3.6 install --user somemodule
Get Attribute error
https://drive.google.com/open?id=1qcMH1larOuLRUfshfOqOJz_JBD5OOl0F
It looks like you're running into a bug in an old version of setuptools, which is vendored into pip. However, the installed version of pip on PythonAnywhere should work fine. Have you upgraded pip3.6
for your account? What do you see if you run which pip3.6
from a bash console?
I haven't upgraded pip3.6. When I run which pip3.6 from bash, I get: /usr/local/bin/pip3.6
Giles' github issue link above seems to be imply that pip 9.0.2 is problematic.
I can confirm that our current version of pip3.6 is pip 9.0.1, and that it successfully installs python-telegram-bot without any errors.
What is your version when you run pip3.6 --version
?
Updates: I made new account and successfully installed 2 modules with pip 3.6 . But now I tried install one more module (on my second - new account) and i get the same attribute error like on my first acoount(((( I try in bash pip3.6 --version and get:
$ pip3.6 --version
Traceback (most recent call last):
File "/usr/local/bin/pip3.6", line 7, in <module>
from pip import main
File "/usr/local/lib/python3.6/dist-packages/pip/__init__.py", line 26, in <module>
from pip.utils import get_installed_distributions, get_prog
File "/usr/local/lib/python3.6/dist-packages/pip/utils/__init__.py", line 27, in <module>
from pip._vendor import pkg_resources
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 3018, in <module>
@_call_aside
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 3004, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 3046, in _initialize_master_working_set
dist.activate(replace=False)
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2578, in activate
declare_namespace(pkg)
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2152, in declare_namespace
_handle_ns(packageName, path_item)
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2092, in _handle_ns
_rebuild_mod_path(path, packageName, module)
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2121, in _rebuild_mod_path
orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'
How can I fix the problem? I completly new in Pythonanywhere and python programmig so I can't understand the problem by myself.
[edit by admin: formatting]
Which modules did you install? It sounds like one of them is somehow breaking pip. If you let us know which ones they were, perhaps we can pin down which it is, and how it's doing it.
I've istalled internetarchive and telepot for seccond account and only internetarchive for the first. So I think it's may be internetarchive.
ok- I can confirm that from a new account, doing a
pip3.6 install --user internetarchive
and then a
pip3.6 install --user telepot
results in the above error.
In particular, I traced it down to a backports package that internetarchive installs. Manually deleting all traces of backports from your ~/.local folder gets pip and any pip installs to work again.
Thanks a lot! It's worked for me.
Excellent, glad we could help!
Hello, i can't install modules using pip either. Even after importing pip as import pip3 nor import pip3.6 neither works when working with the bash python 3.6 script in pythonanywhere.com .
After importing, I try to do installations such as
pip3.6 install --user pythonanywhere
as shown in the photo below but yet it does not work.
I even tried the examples cited by @chocopoco above but it didn't work to. Please I am a newbie to pythonanywhere and will be glad to have a response on how to go about. Thanks
I can't see the picture. If you're trying to import pip, I'm guessing you're trying to run pip from a python console. Don't do that. Run it in a bash console.
Ok thanks,I was actually running from the python console instead. it works now
Hi...i can't install modules using pip either. Even after importing pip as import pip3 nor import pip3.6 neither works when working with the bash python 3.6 script in pythonanywhere.com . After importing, I try to do installations such as pip3.6 install --user pythonanywhere as shown in the photo below but yet it does not work.
See our help page here: http://help.pythonanywhere.com/pages/InstallingNewModules/
Hi, Also getting the same error:
Traceback (most recent call last):
File "/usr/local/bin/pip3.6", line 7, in <module>
from pip import main
File "/usr/local/lib/python3.6/dist-packages/pip/__init__.py", line 26, in <module>
from pip.utils import get_installed_distributions, get_prog
File "/usr/local/lib/python3.6/dist-packages/pip/utils/__init__.py", line 27, in <module>
from pip._vendor import pkg_resources
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 3018, in <module>
@_call_aside
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 3004, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 3046, in _initialize_master_working_set
dist.activate(replace=False)
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2578, in activate
declare_namespace(pkg)
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2152, in declare_namespace
_handle_ns(packageName, path_item)
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2092, in _handle_ns
_rebuild_mod_path(path, packageName, module)
File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2121, in _rebuild_mod_path
orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'
What could be wrong?
[edited by admin: formatting]
What is the command that you run?