0
I just created a Python script, which is running fine in Spyder (I'm using Anaconda). When I try to run it now in the command prompt, I always get errors that say that libraries are missing, which are definitely installed. I am also pretty sure, that I'm using the same Python environment (the base environment).
I set the environment variable for Python as follows:
When I open cmd in the directory of my script and type "python my_script.py", I get this error:
C:\Users\xx\Desktop\yy>python my_script.py
Traceback (most recent call last):
File "my_script.py", line 15, in <module>
import webdav.client as wc
File "C:\Users\xx\Anaconda3\lib\site-packages\webdav\client.py", line 3, in <module>
import pycurl
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
But when I try then to install pycurl, I get this error:
C:\Users\xx\Desktop\yy>pip install pycurl
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Requirement already satisfied: pycurl in c:\users\xx\anaconda3\lib\site-packages (7.43.0.2)
I think there's something wrong with the path variables, because I just had this problem also with numpy. After uninstalling and installing it a few times, the numpy error disappeared.
But like I said, it's really weird that the script runs fine in Spyder, but doesn't work in the command prompt - even though I'm using the same Python environment.
Does anyone know how to fix this issue?