Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miniconda3. ImportError: Unable to import required dependencies... #6843

Closed
PavelD0770 opened this issue Aug 3, 2019 · 9 comments
Closed
Assignees
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@PavelD0770
Copy link

When running the script in VS Code, an error is issued:

C:\Users\user>C:/Python/Miniconda3/envs/myenv/python.exe d:/Test/Test.py
Traceback (most recent call last):
File "d:/Test/Test.py", line 1, in import pandas
File "C:\Python\Miniconda3\envs\myenv\lib\site-ackages\pandas_init_.py", line 17, in "Unable to import required dependencies:\n" + "\n".join(missing_dependencies)
ImportError: Unable to import required dependencies:
numpy: DLL load failed: The specified module was not found.

What am I doing.
  1. Install Miniconda3

  2. I create myenv virtual environment in Miniconda3

  3. Download packages there: pandas, numpy, etc.

  4. Launch VS Code (Microsoft's Python extension installed)

  5. I create a Python script file with text (for example):
    import pandas
    print ('pass ..')

  6. I select the virtual environment myenv and run the script on
    performance.

  7. I observe the above error :(

    Works from the console (miniconda), works from Visual Studio 2019, works from Pycharm too. From VS Code, it only works when changing to the virtual environment (venv) of Python 3.7, in which the packages from p. 3 are also installed. Those. the only problem is a bunch of VS Code and Miniconda3.

    A similar problem with numpy, matplotlib, scipy. C, for example, sqlalchemy, requests and some other third-party packages are all OK.

    Previously, VS code worked with the Miniconda3 virtual environment without any problems. Perhaps the problem appeared after installing and then uninstalling Anaconda Extension Pack.

Python 3.7.4
Miniconda3 4.7.10 (Python 3.7.3)
Virtual env.: virtualenv (Python 3.7.4), conda envs. (Python 3.7.3)
VS Code version: Code 1.36.1 (2213894, 2019-07-08T22:59:35.033Z)
MS Python extension for Visual Studio Code 2019.6.24221
OS version: Windows_NT x64 10.0.17134

System Info
CPUs Intel(R) Core(TM) i3-7100U CPU @ 2.40GHz (4 x 2400)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 5.89GB (0.37GB free)
Process Argv
Screen Reader no
VM 0%

Extensions (3):
vscode-language-pack-ru MS- 1.37.3
python ms- 2019.6.24221
material-icon-theme PKi 3.8.1

@PavelD0770 PavelD0770 added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Aug 3, 2019
@PavelD0770
Copy link
Author

The problem is that when choosing a virtual conda environment, this environment is not activated. To fix the problem, you must manually execute activate myenv (myenv is the environment name) in the VS code terminal.

@PavelD0770
Copy link
Author

Yes, specifying Path for conda is necessary. But in other IDEs it works without environment variables. Still, this is a problem with VS code or the Python extension package for Visual Studio Code

@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Aug 5, 2019
@ericsnowcurrently
Copy link
Member

Thanks for letting us know about this, @PavelD0770. Before we take a deeper look, it looks like you are trying to use conda and virtualenv together. Is that the case? If so, why? Using conda alone should be sufficient. Keep in mind that the extension expects one or the other, not both.

@ericsnowcurrently ericsnowcurrently added info-needed Issue requires more information from poster feature-interpreter labels Aug 5, 2019
@PavelD0770

This comment has been minimized.

@PavelD0770
Copy link
Author

PavelD0770 commented Aug 5, 2019 via email

@ericsnowcurrently
Copy link
Member

So you are saying that everything is fine now that you have uninstalled miniconda?

@meastream

This comment has been minimized.

@ericsnowcurrently ericsnowcurrently removed the info-needed Issue requires more information from poster label Sep 16, 2019
@ericsnowcurrently
Copy link
Member

@meastream, for conda activation happening after the debugger starts, that is a known issue (see #6010 and #7425). For the other problems, please create a new issue.

@ericsnowcurrently ericsnowcurrently added the info-needed Issue requires more information from poster label Oct 7, 2019
@gramster gramster added area-environments Features relating to handling interpreter environments and removed feature-interpreter labels Oct 10, 2019
@brettcannon
Copy link
Member

Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off.

@ghost ghost removed the triage label Nov 26, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

6 participants