- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Following is the error for installing python packages in DevCloud terminal using pip.
Traceback (most recent call last):
File "/glob/intel-python/python3/bin/pip", line 6, in <module>
sys.exit(pip.main())
AttributeError: module 'pip' has no attribute 'main'
- Tags:
- General Support
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I got the same error report when using pip to install any package to --user space. We need help from admin to reinstall pip.
Thanks,
Phillip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you please let us know the installation steps that you have followed and where you are trying out.
Kindly attach the screenshots of the installation, so that we can try it from our end.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you please provide the requested details.
Meanwhile,try to install the package after creating a conda environment using below commands.
conda create -n my_env python=3.6
conda activate my_env
pip install <package_name> --user
<package_name> - package that you are trying to install
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
u31658@s001-n052:~$ conda create -n my_env python=3.6
WARNING: The conda.compat module is deprecated and will be removed in a future release.
Collecting package metadata: done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.6.11
latest version: 4.8.0rc0
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: /home/u31658/.conda/envs/my_env
added / updated specs:
- python=3.6
The following packages will be downloaded:
package | build
---------------------------|-----------------
bzip2-1.0.6 | 19 100 KB file:///opt/intel/inteloneapi/conda_channel
certifi-2018.1.18 | py36_2 143 KB intel
intelpython-2021.1b3 | 3 4 KB file:///opt/intel/inteloneapi/conda_channel
libgcc-ng-9.1.0 | hdf63c60_0 8.1 MB file:///opt/intel/inteloneapi/conda_channel
openssl-1.0.2s | 0 2.2 MB intel
pip-19.1.1 | py36_0 1.9 MB intel
python-3.6.9 | 5 24.6 MB intel
setuptools-41.0.1 | py36_0 611 KB intel
sqlite-3.28.0 | 0 2.3 MB intel
tcl-8.6.4 | 24 1.3 MB file:///opt/intel/inteloneapi/conda_channel
tk-8.6.4 | 29 1.1 MB file:///opt/intel/inteloneapi/conda_channel
xz-5.2.4 | h14c3975_7 417 KB file:///opt/intel/inteloneapi/conda_channel
zlib-1.2.11 | h14c3975_7 118 KB file:///opt/intel/inteloneapi/conda_channel
------------------------------------------------------------
Total: 42.8 MB
The following NEW packages will be INSTALLED:
bzip2 conda_channel/linux-64::bzip2-1.0.6-19
certifi intel/linux-64::certifi-2018.1.18-py36_2
intelpython conda_channel/linux-64::intelpython-2021.1b3-3
libgcc-ng conda_channel/linux-64::libgcc-ng-9.1.0-hdf63c60_0
openssl intel/linux-64::openssl-1.0.2s-0
pip intel/linux-64::pip-19.1.1-py36_0
python intel/linux-64::python-3.6.9-5
setuptools intel/linux-64::setuptools-41.0.1-py36_0
sqlite intel/linux-64::sqlite-3.28.0-0
tcl conda_channel/linux-64::tcl-8.6.4-24
tk conda_channel/linux-64::tk-8.6.4-29
wheel intel/linux-64::wheel-0.31.0-py36_3
xz conda_channel/linux-64::xz-5.2.4-h14c3975_7
zlib conda_channel/linux-64::zlib-1.2.11-h14c3975_7
Proceed (
Downloading and Extracting Packages
tk-8.6.4 | 1.1 MB | ################################################################################ | 100%
zlib-1.2.11 | 118 KB | ################################################################################ | 100%
setuptools-41.0.1 | 611 KB | ################################################################################ | 100%
openssl-1.0.2s | 2.2 MB | ################################################################################ | 100%
libgcc-ng-9.1.0 | 8.1 MB | ################################################################################ | 100%
tcl-8.6.4 | 1.3 MB | ################################################################################ | 100%
intelpython-2021.1b3 | 4 KB | ################################################################################ | 100%
xz-5.2.4 | 417 KB | ################################################################################ | 100%
python-3.6.9 | 24.6 MB | ################################################################################ | 100%
sqlite-3.28.0 | 2.3 MB | ################################################################################ | 100%
pip-19.1.1 | 1.9 MB | ################################################################################ | 100%
certifi-2018.1.18 | 143 KB | ################################################################################ | 100%
bzip2-1.0.6 | 100 KB | ################################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate my_env
#
# To deactivate an active environment, use
#
# $ conda deactivate
u31658@s001-n052:~$ conda activate my_env
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- fish
- tcsh
- xonsh
- zsh
- powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
u31658@s001-n052:~$ pip install opencv-python --user
Traceback (most recent call last):
File "/glob/intel-python/python3/bin/pip", line 6, in <module>
sys.exit(pip.main())
AttributeError: module 'pip' has no attribute 'main'
u31658@s001-n052:~$ conda activate my_env
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- fish
- tcsh
- xonsh
- zsh
- powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
u31658@s001-n052:~$ pip install numpy
Traceback (most recent call last):
File "/glob/intel-python/python3/bin/pip", line 6, in <module>
sys.exit(pip.main())
AttributeError: module 'pip' has no attribute 'main'
u31658@s001-n052:~$ pip install opencv-python --user
Traceback (most recent call last):
File "/glob/intel-python/python3/bin/pip", line 6, in <module>
sys.exit(pip.main())
AttributeError: module 'pip' has no attribute 'main'
u31658@s001-n052:~$ ^C
u31658@s001-n052:~$
The issue is still not resolved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can this issue be resolved soon as I have to submit project code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We are also able to re-produce your issue(refer the screenshot1). Actually, this issue exists only with new Devcloud accounts.
If you want to install the package in base environment( /glob/intel-python/python3/bin/python), you can try with following command which worked for us.(refer the screenshot2)
pip3 install <package-name> --user
Otherwise, if you are planning to use the conda environment that you have created already, then activate the environment with below command and try the installation.
source activate my_env
pip install <package_name> --user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue is resolved now. I'm able to install pip packages locally. Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for the confirmation. We are closing the thread. Please feel free to raise a new thread for further issues.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page