After searching everywhere on here I found some solutions to my problem. At first, the error was that I needed Visual C++ 14.0 and that I could get it from a link that didn't work. So, I downloaded Visual C++ Build Tools and got Visual C++ 14.0.23026. That did not solve the problem.
I did some more searching and found that I could install it using wheel. So, I got wheel and got the .whl file from here as shown in the comments of this
post, making sure to get the correct version for my python version (3.6). Running python -m pip install wordcloud-1.5.0-cp36-cp36m-win32.whl worked, it seemed.
However, after restarting Pycharm, the IDE I use to run python files, it still didn't import it correctly. ModuleNotFoundError: No module named 'wordcloud'.
What am I missing here? Thanks!
EDIT: It works outside of Pycharm (just double clicking my python file), but I'd still like it to work in Pycharm.
I have the same problem and I've solved it.
When you create a project, you should choose 'inherit global site-packages
Or
You can use the terminal in the Pycharm to install the wordcloud.
You can also install wordcloud by File->Settings->Project:your project name->Project interpreter.
Related
I am using a Jupyter notebook running in VSCode to test some ideas for a work project and I am using a package that is in a private GitHub repo. I encountered certain conflicts with versions of jax and numpy and after some fiddling trying to fix the issues, I simply re-installed said package to make sure I was using the correct versions of all required packages. Everything seemed fine until I re-opened the notebook and found a bunch of Import "<package name>" could not be resolved Pylance.
The imports still work and the code runs, however, PyLance appears not to be "seeing" said package.
I am using a conda Python 3.8 environment and to re-install the package I ran
pip install -e . --force-reinstall
I have also tried un-installing and re-installing the package, as well as creating a brand new conda env, and then installing the package there. Neither of these options worked however and I was stuck with the same issue.
Upon inspection of what is in sys.path I saw a strange entry
'__editable__.<package_name>-<package_version>.finder.__path_hook__'
I know that a colleague (who does not have this issue) does not see anything similar and instead has the correct local path to the package.
I should also note that I have the Python extension enabled, which includes the Jupyter and Pylance extensions as well. I have tried re-installing those extensions as well and that did not solve the issue either.
Edit.
I will add that I only get this PyLance error in notebooks. If I open a regular Python file then all PyLance features appear to be working as expected.
I tried to install mypy with "phyton -m pip install mypy" but it fails with an error about typed_ast that says it needs Visual C++ compiler but after installing that the error remains. I found several similar reports and notes that it can't be fixed due to the typed_ast thing, I don't know any details about that.
Is there a way to install mypy manually? Just copy a bunch of files somewhere?
I use Windows 10, Python 3.7, I updated to the latest pip.
Any help or hint is welcome
Thanks a lot
Martin
I found an answer myself.
I have python 3.7-32 installed and there is no appropriate wheel for typed -ast for this. This video
https://www.youtube.com/watch?v=XZrThBBpFlo
explains the problem and also gives a solution. I installed a 32-bit wheel from the link given and then installed mypy again and it finished successfully.
Now I will try mypy.
Good luck
Running: Ubuntu 16.04 and Python 3.5.2
So I ran a script which I found here: https://github.com/rferrazz/pyqt4topyqt5
in order to convert one of my projects built in PyQt4 into a PyQt5 project.
I ran the script and the conversion was made just fine with no errors. Essentially, everywhere QtGui() was used was changed to QtWidgets(). The only problem, when I try to run the new PyQt5 project I get the following error:
ImportError: /usr/local/lib/python3.5/dist-packages/PyQt5/QtGui.so: undefined symbol: PySlice_AdjustIndices
I am not positive but it seemed to me this would be a version error of some kind, which brings me to my questions. Is there a method of updating Python from 3.5 to the newest version release which I believe is 3.7 from the command prompt? Also, is the ImportError I got a version control issue like I believe it to be?
The solution to this problem ended up being a version problem from what I can tell. I installed py3.7 from source using pyenv, drove the script with that interpreter through PyCharm and was able to run it.
I have python 3.6 installed, I have a python extension installed on Visual Studio code but I still can't use pip on Visual Studio code. It says it is not a recognised command. Any help please?
Update: I tried installing pip manually but a file in python2.7 keeps stopping. What's bothersome is that I uninstalled python 2.7 ages ago and I've currently removed every folder with it but python-V still says I have python2.7.6 installed.
I'm on windows 10
I found some solution on this website:
https://pip.pypa.io/en/stable/installing/
If you use Visual Studio Code, you can type the following command:
C:\> py -m pip
If everything is alright, you should see the list of commands, which you can use. They are listed in your terminal, as per below.
I also would advise you to check/select the version of Python you are using:
VSCode: There is no Pip installer available in the selected environment
I am pretty sure your problems of VSCode not finding the correct version of Python will be resolved if you add your ( Python 3.6 installation ) location to the system path.
I'm trying to install Pygame and it returns me the following error "Python version 3.4 required which was not found in the registry". However I already have the Python 3.4.1 installed on my system. Does anyone know how to solve that problem?
I've been using Windows 8.1
Thanks in advance.
Are you using a 64-bit operating system? Try using the 32-bit installer.
Tips I can provide:
Add Python to your Path file in the Advanced settings of your Environmental Variables (just search for it in the control panel)
Something may have gone wrong with the download of Python, so re-install it. Also don't download the 64-bit version, just download the 32-bit version from the main pygame website
Once that's sorted out, transfer the entire Pygame file to the site packages in the Python directory and open up the pygame file and go to this directory in command prompt. Finally, run the Pygame setup from the command prompt which should be something like:
python setup.py
But this will only work if the pygame setup file is called setup.py (it's been a while since I downloaded it), you added Python to the Path file and you're currently in the correct directory in command prompt.
To test if it worked try importing pygame and see if you got an error or not.