I'm working on Ubuntu 20.04 and I want to install a package from some repo in python.
pip3 install git https://path-to-repo.git
this should have worked fine because when I do pip3 show package_name
the package is found. However:
> python3
Python 3.8.2 (default, Mar 13 2020, 10:14:16)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import package_name
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'package_name'
What am I doing wrong? How can I use the installed package?
CodePudding user response:
My solution:
- Create new conda environment
conda create -n new_env
- Activate the new environment
source activate new_env
- Install pip in the new environment
conda install pip
- Install the package from git
pip install git https://path-to-repo.git