BUG: Conda installation not working
See original GitHub issueDescribe your issue.
While following the development quickstart for installing scipy, I always encounter the following message error while importing scipy :
$ python -c "import scipy"
Traceback (most recent call last):
File "/home/avolant/workspace/scipy/scipy/__init__.py", line 126, in <module>
from scipy.__config__ import show as show_config
ModuleNotFoundError: No module named 'scipy.__config__'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/avolant/workspace/scipy/scipy/__init__.py", line 131, in <module>
raise ImportError(msg) from e
ImportError: Error importing SciPy: you cannot import SciPy while
being in scipy source directory; please exit the SciPy source
tree first and relaunch your Python interpreter.
Reproducing Code Example
Just run the installation guide :
# Create an environment with all development dependencies
conda env create -f environment.yml # works with `mamba` too
conda activate scipy-dev
# Initialize git submodules
git submodule update --init
# Build SciPy for development work plus run tests
python runtests.py # Alternatively, it's fine to use `python setup.py develop`
# Install SciPy in develop mode in conda
conda develop .
and then try to import SciPy :
python -c "import scipy"
Error message
Traceback (most recent call last):
File "/home/avolant/workspace/scipy/scipy/__init__.py", line 126, in <module>
from scipy.__config__ import show as show_config
ModuleNotFoundError: No module named 'scipy.__config__'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/avolant/workspace/scipy/scipy/__init__.py", line 131, in <module>
raise ImportError(msg) from e
ImportError: Error importing SciPy: you cannot import SciPy while
being in scipy source directory; please exit the SciPy source
tree first and relaunch your Python interpreter.
SciPy/NumPy/Python version information
python -c "import sys, numpy; print(numpy.__version__, sys.version_info)"
1.21.2 sys.version_info(major=3, minor=9, micro=7, releaselevel='final', serial=0)
Additional information
I tried to put the $PYTHONPATH
variable to successively :
~/miniconda3/envs/scipy-dev/lib/python3.9
path-to/scipy
I tried some other issues on GitHub or Stackoverflow, but it doesn’t appear to be correlated to this one
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Troubleshooting — Anaconda documentation
Close and relaunch Spyder and see if the problem remains. On the menu, select Start, then select Reset Spyder Settings and see if...
Read more >can't install anything using conda, it hangs in solving ... - GitHub
Hello,. I don't seem to be able to install anything using conda. It hangs in "solving environment". I tried: conda install -c anaconda...
Read more >Troubleshooting — conda 22.11.1.post13+5eef286ca ...
Occasionally, an installed package becomes corrupted. Conda works by unpacking the packages in the pkgs directory and then hard-linking them to the environment....
Read more >python - Conda install and update do not work also solving ...
1) I cannot use conda install for any package. It will give me the error in solving environment list this: failed with initial...
Read more >Common Conda Issues | MUSA 550
This is actually caused by a problem with the conda software on Windows. You should be able to solve it by updating to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Going to submit a Doc fix then
This is real. Faced the exact same problem today. A lot of people will follow the docs and we should get this fixed soon. In case the fix takes too long then maybe update the docs?