Issues installing packages WinError87
Hello All,
I am trying to install python packages in my Pycharm IDE and am receiving the following error. I have been trying my darn-dest to solve my issue but I have ran into a dead end. The following error is what I am receiving when I attempt to install a package via Project Interpreter:
Executed command: pip install olefile
Error Occured: Could not install packages due to an EnvironmentError: [WinError 87] The parameter is incorrect
Proposed Solution: Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'C:\Users\Drew\PycharmProjects\HelloWorld\venv\Scripts\python.exe'.
Command Output:
Collecting olefile
Using cached https://files.pythonhosted.org/packages/34/81/e1ac43c6b45b4c5f8d9352396a14144bba52c8fec72a80f425f6a4d653ad/olefile-0.46.zip
Error [WinError 87] The parameter is incorrect while executing command python setup.py egg_info
Could not install packages due to an EnvironmentError: [WinError 87] The parameter is incorrect
Please sign in to leave a comment.
How does it go if you try installing it from the system command prompt (outside of PyCharm) into the same interpreter?
I am able to load the package this way but I am not able to call it in my Python Project.
Using the pip install olefile command, nothing is wrote to my sitepackages folder in my project.
This way you are not installing it to your venv. You need to activate your virtual environment and then install the package. Please try it and let me know the result.
I activated my virtual environment and am still not seeing the package in my site-packages folder, but for some reason I am not able to call them in Python or see them.
Attached is more of the error that I hope can help?
Could you please provide the output of where python from the system command prompt after activating venv and a screenshot of your Project Interpreter in PyCharm (File | Settings | Project | Project Interpreter)?
Also, can you see the installed package in Project Interpreter settings?
Here is the where python from the activated venv
and where is my pycharm settings
I did however notice this in the venv lib site packages. But I still cannot import olefile.
I guess it's not installed. In the previous message, you installed numpy, though it's odd that it's not listed among installed packages.
Try installing olefile from the command prompt once again. If it's successful, it should appear in PyCharm. What's the result?
This is very weird. I installed numpy and it imported into Pycharm like normal.
I do notice now that they are both in the folder too.
1 thing is that there isnt the dist-info for olefile like there is for numpy. Could that be it?
I noticed that inside the olefile is a .egg-info folder; so I moved it outside of the folder and now it showed up; yet Pycharm still wont import it. Is there something I have to do like run the setup.py file?
Unless you are able to import it from the command prompt, I doubt that you will be able to import it in PyCharm.
There is really nothing PyCharm can do if there is a problem with the package/environment.