- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Devcloud admin and support
when I install any user python package i got the following error, you can use the following command to reproduce the error :
python3 -m pip install tqdm --user
Traceback (most recent call last):
File "/glob/intel-python/python3/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/glob/intel-python/python3/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/glob/intel-python/python3/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/glob/intel-python/python3/lib/python3.6/site-packages/pip/__init__.py", line 26, in <module>
from pip.utils import get_installed_distributions, get_prog
File "/glob/intel-python/python3/lib/python3.6/site-packages/pip/utils/__init__.py", line 27, in <module>
from pip._vendor import pkg_resources
File "/glob/intel-python/python3/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3018, in <module>
@_call_aside
File "/glob/intel-python/python3/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3004, in _call_aside
f(*args, **kwargs)
File "/glob/intel-python/python3/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3046, in _initialize_master_working_set
dist.activate(replace=False)
File "/glob/intel-python/python3/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2578, in activate
declare_namespace(pkg)
File "/glob/intel-python/python3/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2152, in declare_namespace
_handle_ns(packageName, path_item)
File "/glob/intel-python/python3/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2092, in _handle_ns
_rebuild_mod_path(path, packageName, module)
File "/glob/intel-python/python3/lib/python3.6/site-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'
thank you,
W
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us.
Could you please try installing the package after creating a conda environment.
Please follow the below steps:
1. Create a conda environment:
conda create -n env_name python=3.6
2. Activate the environment:
source activate env_name
3. Install the package:
python3 -m pip install tqdm --user
If the issue still persists please let us know.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello AThiraM,
I tried your steps but received same error, Is there any solution without using conda ?
thank you, I appreciate your help!
regards,
W
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I try to run pip it's shows errors
And also while running conda
login-2:~$ conda install -c conda-forge tqdm
-bash: /glob/intel-python/python2/bin/conda: /glob/intel-python/versions/2018u2/intelpython2/bin/python: bad interpreter: No such file or directory
login-2:~$ pip install --user telethon
-bash: /glob/intel-python/python2/bin/pip: /glob/intel-python/versions/2018u2/intelpython2/bin/python: bad interpreter: No such file or directory
u222313@login-2:~$ conda create -n env_name python=3.6
-bash: /glob/intel-python/python2/bin/conda: /glob/intel-python/versions/2018u2/intelpython2/bin/python: bad interpreter: No such file or directory
I can even install any python package everytime it shows same things both in terminal and jypter notebook
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You can activate the oneAPI environment before installing the package.
Please find the below command to activate the oneAPI environment:
source /opt/intel/inteloneapi/setvars.sh
Please make sure that the python used is "/glob/development-tools/versions/oneapi/beta09/inteloneapi/intelpython/latest/bin/python" using "which python" command.
Also you can try to install the tqdm package using conda:
conda install -c conda-forge tqdm
If the issue still persists please share your user id and give us the permission to access your DevCloud account. We will inform the concerned team.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you please give us an update? Is your issue resolved?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have not heard back from you, we wont be monitoring this thread. If you need further assistance, please post a new thread.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Athira,
the system still report the same error.
I found there are some solutions for the same problem on the following links :
https://stackoverflow.com/questions/47955397/pip3-error-namespacepath-object-has-no-attribute-sort
https://github.com/googleapis/google-cloud-python/issues/2990
I don't have privilege to the system to try these solutions
thank you for your help and support.
![](/skins/images/7B0AB6865064EAE32B30EC9A4E94B48A/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page